destineFont = Font("AR_Destine", "#0055ff") # Fetch key presses mykeys = Keyboard() #create a light mylight = Light(0, 2,2,2, "", 1,0,0, 0.1,0.1,0.1, 0) mylight.on() # Display scene while 1: display.clear() mysphere.draw(patimg) mysphere.rotateIncY( 0.5 ) myhemisphere.draw(coffimg) myhemisphere.rotateIncY( .5 ) myhelix.draw(patimg) myhelix.rotateIncY(3) myhelix.rotateIncZ(1) mytube.draw(coffimg) mytube.rotateIncY(3) mytube.rotateIncZ(2) myextrude.draw(coffimg,patimg,patimg) myextrude.rotateIncY(-2) myextrude.rotateIncX(0.37)
m2Rad = 0.55 # radius moon's moon orbit #create a light mylight = Light(0,5,5,5,"sun",10,0,6, .1,.1,.2, 0) mylight.on() # Display scene while 1: display.clear() myplane.draw(starsimg) myplane.rotateIncZ(0.01) mysphere.draw(earthimg) mysphere.rotateIncY(0.1) mysphere2.draw(cloudimg) mysphere2.rotateIncY(.15) mymoon.draw(moonimg) mymoon.position(mysphere.x+m1Rad*sin(rot1),mysphere.y+0,mysphere.z-m1Rad*cos(rot1)) mymoon.rotateIncY(0.2) mymoon2.draw(watimg) mymoon2.position(mymoon.x+m2Rad*sin(rot2),mymoon.y+0,mymoon.z-m2Rad*cos(rot2)) mymoon2.rotateIncY(3) rot1 -= 0.005 rot2 -= 0.021 k = mykeys.read()