Sign In
Start by marking a corner of the solid.
Sketch:
We are asked to sketch a triangular prism 2 units high, with two sides of the base being 5 and 4 units long.
To draw the prism we will follow the steps below.
<jsxgpre id="Solution41554_2" static=0>
var b = mlg.board([-1.5, 13.5, 11.5, -1.5], {desktopSize:'medium', style:'usa'});
/* Createa an Iso paper, returns an array of array of points */
function myIsoPaper(nVal,mVal){
var theta = 30;
var r = 1;
var n = nVal;
var m = mVal;
var ptsOpt = {fillColor:'skyblue',size:0.2,strokeColor:'transparent',layer:0};
var p = new Array(n);
for(var ii=0; ii<n;ii++){ p[ii] = new Array(m); }
for(var i=0;i<n;i++){
for(var j=0;j<m;j++){
if(i==0){
p[i][j] = b.point(0,2*j*Math.sin(theta*Math.PI/180),ptsOpt);
}
else{
p[i][j] = b.polarpoint(p[i-1][j],Math.pow(-1,i-1)*theta,r,ptsOpt);
}
}
}
return p;
}/*End of myIsoPaper*/ /*Show coordinates of 2-dim. array of points*/ function showCoords(pts){ for(var i=0; i<pts.length; i++){
for(var j=0; j<pts[i].length; j++){
b.txt(pts[i][j].X(), pts[i][j].Y(), i.toString().concat(',\\!',j.toString()),{fontSize:0.8});
}
}
}
/* %make a paper*/
var p = myIsoPaper(14,8);
/*showCoords(p);*/
var stepVar = {};
var stageText = b.txt(5.5,8.25,' ');
function step1(anim){
b.changeText(stageText,'\\textbf{Step 1}');
stepVar.p1 = b.point(p[6][3].X(),p[6][3].Y(),{fillColor:'black',size:0.2});
}
function step2(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 2}');
stepVar.seg2 = b.segment(p[6][3],p[6][1],{strokeWidth:1.5});
}
}
function step3(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 3}');
stepVar.seg3 = b.segment(p[6][3],p[2][5],{strokeWidth:1.5});
}
}
function step4(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 4}');
stepVar.seg4 = b.segment(p[6][3],p[11][5],{strokeWidth:1.5});
}
}
function step5(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 5}');
stepVar.seg5a = b.segment(p[2][5],p[11][5],{strokeWidth:1.5});
}
}
function step6(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 6}');
stepVar.seg6a = b.segment(p[2][5],p[2][3],{strokeWidth:1.5});
stepVar.seg6b = b.segment(p[11][5],p[11][3],{strokeWidth:1.5});
}
}
function step7(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 7}');
stepVar.seg7a = b.segment(p[6][1],p[2][3],{strokeWidth:1.5});
stepVar.seg7b = b.segment(p[2][3],p[11][3],{strokeWidth:1.5,dash:2});
stepVar.seg7d = b.segment(p[11][3],p[6][1],{strokeWidth:1.5});
}
}
function step8(anim){
if(anim == 0){
b.changeText(stageText,'\\textbf{Step 8}');
stepVar.front_face = b.polygon([p[6][1],p[2][3],p[2][5],p[6][3]],{fillColor:'blue',borders:{visible:false},fillOpacity:0.9});
stepVar.right_face = b.polygon([p[6][3],p[11][5],p[11][3],p[6][1]],{fillColor:'blue',borders:{visible:false},fillOpacity:0.7});
stepVar.top_face = b.polygon([p[2][5],p[11][5],p[6][3]],{fillColor:'blue',borders:{visible:false},fillOpacity:0.5});
}
}
step1();
step2(0);
step3(0);
step4(0);
step5(0);
step6(0);
step7(0);
step8(0);
b.trim();
var buttons = [];
var button0 = function(){
for(var i in buttons){
buttons[i].deselect();
buttons[i].enable();}
buttons[0].disable();
buttons[0].select();
b.remove(stepVar); step1();
}; var button1 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[1].disable(); buttons[1].select();
b.remove(stepVar); step1();
step2(0); }; var button2 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[2].disable(); buttons[2].select();
b.remove(stepVar);
step1(); step2(0); step3(0); }; var button3 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[3].disable(); buttons[3].select();
b.remove(stepVar);
step1(); step2(0); step3(0); step4(0); }; var button4 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[4].disable(); buttons[4].select();
b.remove(stepVar);
step1(); step2(0); step3(0); step4(0); step5(0); }; var button5 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[5].disable(); buttons[5].select();
b.remove(stepVar);
step1(); step2(0); step3(0); step4(0); step5(0); step6(0); }; var button6 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[6].disable(); buttons[6].select();
b.remove(stepVar);
step1(); step2(0); step3(0); step4(0); step5(0); step6(0); step7(0); }; var button7 = function(){ for(var i in buttons){ buttons[i].deselect(); buttons[i].enable();} buttons[7].disable(); buttons[7].select();
b.remove(stepVar);
step1();
step2(0);
step3(0);
step4(0);
step5(0);
step6(0);
step7(0);
step8(0);
};
buttons.push(b.button(0.5,0.25,"1",button0,{mathMode:true, width:35}));
buttons.push(b.button(2,0.25,"2",button1,{mathMode:true, width:35}));
buttons.push(b.button(3.5,0.25,"3",button2,{mathMode:true, width:35}));
buttons.push(b.button(5,0.25,"4",button3,{mathMode:true, width:35}));
buttons.push(b.button(6.5,0.25,"5",button4,{mathMode:true, width:35}));
buttons.push(b.button(8,0.25,"6",button5,{mathMode:true, width:35}));
buttons.push(b.button(9.5,0.25,"7",button6,{mathMode:true, width:35}));
buttons.push(b.button(11,0.25,"8",button7,{mathMode:true,width:35}));
</jsxgpre>