You will find the L1 point of two bodies by bisection, in the frame that turns with them. Distances are in units of the separation, and is the small mass over the large one.
The idea. Put the centre of mass at , the large body at and the small one at . In these units a body at rest in the turning frame at the point between them feels the net pull
L1 is where . Bisection halves an interval again and again, keeping the half where changes sign.
Your tasks.
net_pull, return for a point between the bodies.bisect, carry out halvings of the interval lo to hi and return its middle.hill, return the Hill estimate of the distance from the small body.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…