1c1 < #*********************earth_frames.py************************* --- > #*********************earth.py************************* 5c5 < # usage: python earth_frames.py --- > # usage: python earth.py 15,21c15,17 < earthsys=frame() < earth = sphere(frame=earthsys, pos=(0,0,0), < radius=.25, color=color.blue) < moon = sphere(frame=earthsys, pos=(.5,0,0), radius=.1, < color=(.75,.75,.75)) < earthsys.pos=(4.5,0,0) < --- > earth = sphere(pos=(5,0,0), radius=.25, color=color.blue) > moon = sphere(pos=(5.75,0), radius=.1, color=(.75,.75,.75)) > moonval=0 26,33c22,29 < rate(60) < #earth.rotate(angle=.001, axis=(0,0,1), origin=sun.pos) < #moon.pos=(earth.pos[0]+.75,earth.pos[1],earth.pos[2]) < < #moonval+=.06 < earthsys.rotate(angle=.002, axis=(0,0,1), origin=sun.pos) < moon.rotate(frame=earthsys, angle=0.05, axis=(0,0,1), origin=(0,0,0)) < --- > rate(50) > earth.rotate(angle=.001, axis=(0,0,1), origin=sun.pos) > moon.pos=(earth.pos[0]+.75,earth.pos[1],earth.pos[2]) > moon.rotate(angle=(pi-moonval), axis=(0,0,1), origin=earth.pos) > moonval+=.06 > > if moonval>=2*pi: > moonval=0 37d32 <