I have all 7 planets rotating.

I now have 7 planets rotating around the sun. I have realized that doing
this to scale is not practical just because of the sheer size of the sun
compared to the planets. I will be making it just relatively to scale.
I have also decided to stick with circles rather than ellipses. The next
thing I want to try to do is have the planets either start at different
spots or move at different speeds. We will see.
This commit is contained in:
Lauren Dawnkaski 2024-09-27 13:37:18 -04:00
parent 784ef6a1bd
commit be09d3efec
1 changed files with 48 additions and 7 deletions

View File

@ -17,23 +17,64 @@ def fly(distance):
def sun():
fillcolor("yellow")
begin_fill()
fly(20)
fly(40)
left(90)
circle(20)
circle(40)
end_fill()
left(90)
fly(20)
fly(40)
for frame in animate(60, loop=True):
for frame in animate(80, loop=True):
sun()
with frame.rotate(0, 360):
fly(100)
fillcolor("blue")
fly(40)
fillcolor("thistle")
begin_fill()
circle(3)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("goldenrod")
begin_fill()
circle(8)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("forest green")
begin_fill()
circle(9)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("red")
begin_fill()
circle(4)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("peru")
begin_fill()
circle(25)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("pale violet red")
begin_fill()
circle(20)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("light blue")
begin_fill()
circle(15)
end_fill()
with frame.rotate(0, 360):
fly(40)
fillcolor("midnight blue")
begin_fill()
circle(15)
end_fill()
done()