https://editor.p5js.org/PiaCha/full/yvdgI6vX7

function() makes my life so much easier.

I created separate functions for the sun, the Earth, the moon, and the orbit lines, which makes my code look much cleaner and more organized.

For this one, I tried to figure out how to make the moon orbit around the Earth while the Earth is also moving. Then I realized that I could use calculations to control their movement and positions. I couldn’t really think of any other functions I could use for this project, but I was happy that I was able to figure out the orbit using calculations.

Other things I did (not homework

https://editor.p5js.org/PiaCha/full/GQGPZhkXW

The rabbits are so cute! I created the rabbit() to make them and then animate it separately.

https://editor.p5js.org/PiaCha/full/0T3glfFTs

The rabbit jumps when it is hovered.

https://editor.p5js.org/PiaCha/full/GmnVygTDe

This is the bouncing ball from last week, but I added an animation for when it hits the wall. This allows us to see the movement more clearly and makes the ball feel more alive and realistic.