//Claire Castleman //Section D //ccastlem@andrew.cmu.edu size( 300, 500, P3D ); println("Homework #3"); println("initial i"); lights( ); background(0,0,0); int cube=width*2/15; int ball=height/10; int x=0; int y=0; int z=0; translate( width/2, height/2, 0 ); //rotateY( radians( 45 ) ); //rotateX( radians( -90 ) ); //rotateZ( radians( 30 ) ); translate( -width/2, -height/2, 0 ); pushMatrix( ); translate( x+(width*.5), y+(height*.45),z); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width*.3), y+(height*.45),z); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width*.7), y+(height*.45),z); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width/2), y+(height*.45),z+50); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate(x+(width*.3), y+(height*.45),z+50); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width*.7), y+(height*.45), z+50); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width/2), y+(height*.45),z-50); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width*.3), y+(height*.45), z-50); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width*.7), y+(height*.45), z-50); fill(255,0,0); box( cube ); popMatrix( ); //top 9 cubes pushMatrix( ); translate( x+(width/2), y+(height*.55), z); fill(255,0,0); box( cube ); popMatrix( ); pushMatrix( ); translate( x+(width/2), y+(height*.65), z); fill(255,0,0); box( cube ); popMatrix( ); //middle 2 cubes pushMatrix( ); translate( x+(width/2), y+(height*.75), z ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width*.3), y+(height*.75), z ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width*.7), y+(height*.75), z); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width/2), y+(height*.75), z+50 ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width*.3), y+(height*.75), z+50 ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width*.7), y+(height*.75), z+50 ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width/2), y+(height*.75), z-50 ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width*.3), y+(height*.75), z-50 ); fill(255,0,0); box(cube); popMatrix( ); pushMatrix( ); translate( x+(width*.7), y+(height*.75), z-50 ); fill(255,0,0); box(cube); popMatrix( ); //bottom 9 cubes noStroke(); pushMatrix( ); translate( x+(width*.5), y+(height*.25), z ); fill(255,0,0); sphere(ball); popMatrix( ); //sphere or dot of i