mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
@ -8,7 +8,7 @@ velocity and position brought about by these forces. Softening is used to preven
|
||||
numerical divergences when a particle comes too close to another (and the force
|
||||
goes to infinity).
|
||||
(Description adapted from https://en.wikipedia.org/wiki/N-body_simulation )
|
||||
(See also https://www.shodor.org/refdesk/Resources/Algorithms/EulersMethod/ )
|
||||
(See also http://www.shodor.org/refdesk/Resources/Algorithms/EulersMethod/ )
|
||||
"""
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ def example_1() -> BodySystem:
|
||||
Example 1: figure-8 solution to the 3-body-problem
|
||||
This example can be seen as a test of the implementation: given the right
|
||||
initial conditions, the bodies should move in a figure-8.
|
||||
(initial conditions taken from https://www.artcompsci.org/vol_1/v1_web/node56.html)
|
||||
(initial conditions taken from http://www.artcompsci.org/vol_1/v1_web/node56.html)
|
||||
>>> body_system = example_1()
|
||||
>>> len(body_system)
|
||||
3
|
||||
|
Reference in New Issue
Block a user