generated from mwc/project_drawing
This is my completed drawing project!
I ended up moving the planets around a little more because I didn't like their placement once it was rotating. I am very proud of my work on this project because I was able to combine my new knowledge of computer science with a lot of my math background. I used a lot of trig including right triangle trig law of sines and law of cosines to find certain angles or lengths. I didn't make the model as to scale as I would have liked but I am happy with the results.
This commit is contained in:
parent
0ea0c72d16
commit
1dbcb1934a
40
drawing.py
40
drawing.py
|
@ -102,27 +102,26 @@ def mars():
|
|||
left(50.194428)
|
||||
|
||||
def jupiter():
|
||||
left(40.601294)
|
||||
fly(184.390889146)
|
||||
left(11.4356462439)
|
||||
fly(101.198874263)
|
||||
color("peru")
|
||||
fillcolor("peru")
|
||||
begin_fill()
|
||||
circle(15)
|
||||
end_fill()
|
||||
left(49.398705)
|
||||
|
||||
def saturn():
|
||||
left(41.328658)
|
||||
left(74.186)
|
||||
fly(212.602916255)
|
||||
color("pale violet red")
|
||||
fillcolor("pale violet red")
|
||||
begin_fill()
|
||||
circle(13)
|
||||
end_fill()
|
||||
left(48.671341)
|
||||
|
||||
|
||||
def uranus():
|
||||
left(41.663539)
|
||||
left(90)
|
||||
fly(240.831891576)
|
||||
color("light blue")
|
||||
fillcolor("light blue")
|
||||
|
@ -140,16 +139,25 @@ def neptune():
|
|||
circle(11)
|
||||
end_fill()
|
||||
|
||||
sun()
|
||||
orbit()
|
||||
mercury()
|
||||
venus()
|
||||
earth()
|
||||
mars()
|
||||
jupiter()
|
||||
saturn()
|
||||
uranus()
|
||||
neptune()
|
||||
for frame in animate(120, loop=True):
|
||||
sun()
|
||||
orbit()
|
||||
with frame.rotate(0, 360):
|
||||
mercury()
|
||||
with frame.rotate(0, 360):
|
||||
venus()
|
||||
with frame.rotate(0, 360):
|
||||
earth()
|
||||
with frame.rotate(0, 360):
|
||||
mars()
|
||||
with frame.rotate(0, 360):
|
||||
jupiter()
|
||||
with frame.rotate(0, 360):
|
||||
saturn()
|
||||
with frame.rotate(0, 360):
|
||||
uranus()
|
||||
with frame.rotate(0, 360):
|
||||
neptune()
|
||||
|
||||
done()
|
||||
|
||||
|
|
Loading…
Reference in New Issue