Prompt
Code a simulation in html, css, and javascript that is self-contained, complete, and embeddable that can help 6th graders learn about gravity and inertia. Show the Earth revolving around the sun. Allow the user to adjust the sun's gravity by increasing it or decreasing it to demonstrate how Earth would either be drawn into the sun or drift away is gravity increased or decreased. Add a start animation button to begin earth's revolution. Include a slider that allows the user to increase or decrease the sun's gravity by as little as 1% at a time.
Iteration
The start animation button only works at the beginning of the session. Ensure that the animation restarts after resetting. Also, change Earth's revolution direction to run counterclockwise.
Iteration 2
Allow the user to use their touchpad or mouse to both zoom in toward the sun and zoom out to enlarge the field of view.