Program simulation of three-body motion

Source: Internet
Author: User

I saw three things a few days ago, a good sci-fi novel. Speaking of three things, I thought of Wang Jing, a university roommate. He and the Hong Kong director have the same name and gender. I remember a couple of students chatting and a girl asked him why his parents named him Jing. he said that Jing was a parent who hoped to have three suns guarding him. At that time, I was still very simple. I would not use the five elements to satirize him. I just said that if I named him Wang Jingjing, there would be six suns guarding him. now I have some knowledge about the three-body system, so I realized that it was covered by three suns. It was not a daemon, but it should have been broken down. the planet in the three-body system is played by three stars in the middle of the SOPs and kicked like a ball.

The motion of the three stars in space, under the Action of universal gravitation, is called the three-body motion, which is the simplest and most striking chaos. The chaotic identification system was first discovered by Pang galai when studying the three bodies problem. The movements of only three stars can become complex and dazzling. This complexity had puzzled mathematicians for centuries. If there are only two celestial bodies, then how simple is everything. In the 18th century, bernuoli has solved all the possible trajectories of motion. With proper coordinates, it can be described with simple curves. However, if there is only one more celestial body, it will not wait until the 19th century's pongalai to give a satisfactory answer: There is no beautiful solution (the formal term is that the three-body system is not integral ). This is not due to the limitations of human wisdom, but essentially, the motion tracks between the three celestial bodies cannot be expressed in simple form. Naturally, it is not as simple as originally expected, and its complexity is desperate. However, this complexity breeds countless possibilities. Not all three-body systems are incomprehensible. Through proper construction, we can get some systems that will run along the established curve. By appropriately arranging the speed and position, we can also make one of the stars visit the other two stars in any given order. However, these systems are so fragile that a slight disturbance will break the delicate balance, and the consequence may be that one of the stars is shot out and then separated. Chaos seems to represent endless uncertainty and fear, as our ancestors once felt.

After the software runs, there will be three big balls representing the stars, and the three balls affect each other's rotation. you can add a planet and a comet to the three-body world. we can see the constant epoch and chaotic epoch of the planet.

The Code is based on the law of gravitation and the conservation of kinetic energy. For details, see my previous article: Program Implementation of the planetary motion trajectory. of course, the program is very simplified, and its accuracy cannot be guaranteed. calculus is required to be accurate. in addition, in the constant element, the planet easily enters the interior of the star, so I made some changes to ensure that the planet rotates outside the star. this modification will use the planetary trajectory line not smooth enough.

 

 

 

After the program starts, three random sphere will appear in motion.

Right-click to control the view
The keyboard U is used to switch the UI user interface.
The UI allows you to set the quality of three sphere, set the gravitation coefficient, set the running speed of the celestial body, and set the display size of the sphere.

Keyboard 1, 2, and 3 are used to display the motion tracks of three sphere
Keyboard 9 is used to switch the planet. After startup, a small body will be attracted by the three bodies.
Keyboard 0 is used to switch the huixing. After the keyboard is started, a sphere will be emitted.
The keyboard 4 and 5 are used to display the moving tracks of the planet and comet respectively.

Keyboard g, used to switch 3D mesh display
Keyboard C, used to display the switch axis
Keyboard P for pausing
Keyboard R, used for resetting. Quality and initial speed will be set randomly for the three sphere.

Software: http://files.cnblogs.com/WhyEngine/Chaos.7z

 

 

Program simulation of three-body motion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.