// Jennifer Shin // Section D // jshin1@andrew.cmu.edu // Copyright © Jennifer Shin January 2011 Pittsburgh, PA 15221 All Rights Reserved // no one // no one // set screen size and init variables width and height: size( 400, 400, P3D ); background ( 0, 0, 0 ); lights ( ); int width; int height; width = 400; height = 400; float radius = (.08 * width); fill ( 255, 255, 255 ); noStroke ( ); pushMatrix ( ); translate ( width * .5, height * .15, 0 ); fill ( 250, 108, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .5, height * .15, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .65, height * .2, 0 ); fill ( 250, 232, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .65, height * .2, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .7, height * .35, 30 ); fill ( 255, 0, 30 ); sphere ( width * .025 ); popMatrix ( ); pushMatrix ( ); translate ( width * .7, height * .35, 30 ); fill ( 255, 150 ); sphere ( width * .05 ); popMatrix ( ); pushMatrix ( ); translate ( width * .35, height * .2, 0 ); fill ( 247, 5, 244 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .35, height * .2, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .25, height * .35, 0 ); fill ( 250, 232, 2 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .25, height * .35, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .35, height * .48, 0 ); fill ( 250, 108, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .35, height * .48, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .50, height * .525, 0 ); fill ( 247, 5, 244 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .50, height * .525, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .65, height * .57, 0 ); fill ( 250, 232, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .65, height * .57, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .75, height * .70, 0 ); fill ( 250, 108, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .75, height * .70, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .65, height * .85, 0 ); fill ( 247, 5, 244 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .65, height * .85, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .5, height * .9, 0 ); fill ( 250, 232, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .5, height * .9, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .35, height * .85, 0 ); fill ( 250, 108, 25 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .35, height * .85, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .20, height * .75, 0 ); fill ( 247, 5, 244 ); box ( width * .04 ); popMatrix ( ); pushMatrix ( ); translate ( width * .20, height * .75, 0 ); fill ( 255, 150 ); box ( width * .08 ); popMatrix ( ); pushMatrix ( ); translate ( width * .2, height * .60, 0 ); fill ( 255, 0, 30 ); sphere ( width * .025 ); popMatrix ( ); pushMatrix ( ); translate ( width * .2, height * .60, 0 ); fill ( 255, 150 ); sphere ( width * .05 ); popMatrix ( ); //saveFrame( "hw3.jpg" );