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:
Lauren Dawnkaski 2024-09-30 12:47:30 -04:00
parent 0ea0c72d16
commit 1dbcb1934a
1 changed files with 24 additions and 16 deletions

View File

@ -102,27 +102,26 @@ def mars():
left(50.194428) left(50.194428)
def jupiter(): def jupiter():
left(40.601294) left(11.4356462439)
fly(184.390889146) fly(101.198874263)
color("peru") color("peru")
fillcolor("peru") fillcolor("peru")
begin_fill() begin_fill()
circle(15) circle(15)
end_fill() end_fill()
left(49.398705)
def saturn(): def saturn():
left(41.328658) left(74.186)
fly(212.602916255) fly(212.602916255)
color("pale violet red") color("pale violet red")
fillcolor("pale violet red") fillcolor("pale violet red")
begin_fill() begin_fill()
circle(13) circle(13)
end_fill() end_fill()
left(48.671341)
def uranus(): def uranus():
left(41.663539) left(90)
fly(240.831891576) fly(240.831891576)
color("light blue") color("light blue")
fillcolor("light blue") fillcolor("light blue")
@ -140,15 +139,24 @@ def neptune():
circle(11) circle(11)
end_fill() end_fill()
for frame in animate(120, loop=True):
sun() sun()
orbit() orbit()
with frame.rotate(0, 360):
mercury() mercury()
with frame.rotate(0, 360):
venus() venus()
with frame.rotate(0, 360):
earth() earth()
with frame.rotate(0, 360):
mars() mars()
with frame.rotate(0, 360):
jupiter() jupiter()
with frame.rotate(0, 360):
saturn() saturn()
with frame.rotate(0, 360):
uranus() uranus()
with frame.rotate(0, 360):
neptune() neptune()
done() done()