Developed by Henrik Somogyi, 2022
Users Guide
This is an animation of the motion of objects in a 2D universum.
Each object (one can name them suns, planets, asteroids) attracts each other by the classical gravitational law.
When two objects get too close, then they collide, get merged, while the conservation of momentum is maintained.
Upon such a merge, the new object's mass becomes the sum of the two masses, and its color becomes the "average" of two colors.
You can set the number of objects in the input field. You browser and PC speed may limit this to some humdreds.
The initial objects' speeds and location is random (uniform distributions).
When friction is on, then each object loses a proportional part of its motion energy by time (moving thru some galactical fog).
When "Boxing" is on, objects bounce back from the border of the rectangle of observation. This is not realistic, but makes
the detection of emerging solar-systems more likely.
Mouse click: sets the center-of-screen to the selected location. And the object that is the nearest to this selected location gets the focus.
The visible size of objects is proportional to the mass (radius of 3D sphere), but independent of the zoom level: in order to keep objects
visible even when zoomed out very much.
By activating the "Test" mode (button "Test") a simple 1-Sun+1-Earth+1-Moon solar system is animated. Here you can watch how these objects
move. You can decrease their speeds by the button "Speed-" and watch how the Moon crashes into the Earth or into the Sun. And, how the
Earth crashes into the Sun - or just moves to a closer orbit.
By increasing their speed by button "Speed+", you can see how the Moon escapes from the Earth and Sun, or how
the Earth escapes from the Sun, - or just gets into a farther orbit.
Total sum of motion energy is displayed. Friction on/off, Boxing on/off as well.
Watch how solar systems (one or more object(s) orbiting another one) get formed or dissolve, or collide. This is not too frequent, you may need patience.