Two circles. Two moving dots. One connecting line. Start with a flower made by Kepler's law—and discover that you can make the mathematics move with your own code.
Watch itChange itCode itInvent something newVenus and Earth—two circular orbital rhythms.
Change a number, press Run my code, and watch what happens.
The code is real JavaScript. No special language invented for this lab.
Begin with the flower, then graduate to something completely different:
Try changing Venus's orbital radius from 0.723 to 0.8. The beautiful flower changes. Why?
Your program runs in a separate, restricted calculation frame with a time limit. You can experiment freely, but don't paste unfamiliar code from other people.
Kepler's third law connects the orbital period T with orbit size r for bodies orbiting the same central mass.
For circular orbits, angular speed is proportional to r−3/2. In our chosen units, that's just 1 / r**1.5.
0.723 to 0.80. Does the flower gain or lose its petals?r**1.5 with r**1. That's no longer Kepler's law—what does it draw?3 to a 5 and run it.Once you can compute a position from time, you can plot its journey. You can make pendulums, wave patterns, epicycles, spirals, or shapes that nobody has named yet.
Some systems have convenient formulas. Others need a computer to solve equations step by step, like our gravitational labs.
Scientific note: this first example uses ideal circular Kepler orbits, not a high-precision solar-system ephemeris. The other presets are mathematical patterns, not claims about planetary orbits.
Want the absolute simplest starting point? Open the tiny two-circles, one-line HTML program →