A simulation of the 'three-body problem,' a difficult problem in mechanics that models the movements of three interacting celestial bodies, looks like this



The three-body problem is a problem in classical mechanics that asks how three masses interacting with each other by weight will move, and in the field of celestial mechanics, it has been studied since the 18th century as a problem that models the movement of celestial bodies that interact due to gravitation. 'Three Bodies' can simulate three-body problems, such as the movement of stars, planets, and satellites represented by the 'Sun, Earth, and Moon,' a Lagrangian point where three stars are balanced, and three stars with random masses moving in free orbits.

Three Bodies
https://three-bodies.sulami.xyz/

When I opened the page, three dots of different colors and sizes appeared. Each dot was moving freely. Each dot had the numbers 'm' and 'v' attached to it, where m (mass) represents the mass of the dot and v (velocity) represents the speed at which the dot moves.



Each point basically moves straight at a constant speed, but when two points approach each other, their orbits change as they are attracted to each other. The speed of the green point when moving alone was '0.39', but in the image below it has increased to nearly double '0.75', and you can see that the speed also changes as the points attract each other. This represents the three-body problem in which gravity acts on each point and gravity affects each orbit.



The green and yellow dots attract each other and collide, and the animation stops with the message 'COLLISION.' Three Bodie simulates the collision of three stars of different sizes moving in free orbits.



Click or press the space bar, or tap the screen on a smartphone, and three new stars will appear. This time, there are two green dots of similar size, and one light blue dot with about half the mass.



When two points approach each other, they are attracted to each other and their orbits change. As shown in the red frame below, both points change their orbits, but the small light blue point is bent significantly, while the green point's orbit only changes slightly. The strength of the gravitational force and how easily it is received vary depending on the mass, so they do not move in the same way. Also, in the first simulation, the two points collided immediately because they were close to each other, but the force of attraction only changes the orbit, and in many cases they pass each other and continue moving at a constant speed again.



Perhaps because of the large difference in mass, the small light blue dots reacted sensitively when the green dots approached. In some cases, they even turned in circles.



When two points get close to each other, they only affect each other's orbits slightly, but when three points get close to each other, each is affected by the gravitational forces of the other two, resulting in complex changes.



However, after approaching each other, they return to their respective orbits and resume their linear motion. At least in these three respects, it seems unlikely that the orbits will ever be balanced to stabilize.



As a result, the largest green dot and the smallest light blue dot at the top of the screen collided and the simulation ended.



Three Bodie allows you to deepen your understanding of stellar orbits and gravitational forces through a simple animation by simulating three points with different masses, positions, and orbits each time you retry.

The code for Three Bodie is available on GitHub.

GitHub - sulami/three-bodies: Three body simulation in Wasm
https://github.com/sulami/three-bodies



in Software,   Web Service,   Science, Posted by log1e_dh