Showing initial conditions
Drag inputs are rounded to these ranges and increments. Negative tangential velocity reverses direction; angles are 0° right and 90° down. Restart and shared links use the same initial conditions.
Compare orbit and escape conditions by changing initial velocity, or place fixed sources and explore particle trajectories. Learn from explicit equations, checkable examples and clearly stated model limits.
Single-source links save initial conditions. Sandbox links save the current source and particle states. Switching modes pauses both simulations and preserves their separate states.
Showing initial conditions
Drag inputs are rounded to these ranges and increments. Negative tangential velocity reverses direction; angles are 0° right and 90° down. Restart and shared links use the same initial conditions.
Single-source orbit mode explores one particle's trajectory and energy from its initial radius and velocity. The fixed-source sandbox lets you place sources and compare the forces on multiple test particles. Both are planar softened-force models, not simulations of general relativity or of a real solar system, binary star or galaxy.
Select Single-source circular orbits to place a fixed source of mass 200 at the centre and five particles at radii 80, 120, 160, 200 and 250. At the default G=1, their tangential speeds are $v_c=\sqrt{200r/(r^2+100)}$. The particle at radius 200 starts at approximately 0.998752 model speed. Play the simulation and check whether its radius remains nearly constant.
Pause and change G: source positions and particle velocities are retained, but the gravitational force changes. The previous circular-orbit condition therefore no longer applies. Select the preset again to rebuild its initial configuration with circular speeds for the current G. Do not compare energies before and after changing G as the same system's conserved quantity.
In Two fixed sources and Two-source particle groups, only the test particles move. The sources receive no reaction force from particles and do not move relative to one another. Two-source particle groups is not a galaxy-collision calculation.
Click or tap an empty position to add a source with the selected mass; drag a source to move it. On a desktop, right-click a source to remove it individually. On mobile, Remove sources clears all sources so you can rebuild the configuration. Add particles adds 30 particles. Grid density changes the drawing only, not the force or integration time step.
Total particle KE is $\sum_i |\mathbf v_i|^2/2$, with each test-particle mass set to one. It excludes potential energy and is not conserved on its own. For a particle moving among fixed sources at constant G, with no capture or display-domain stopping, the conserved quantity is kinetic plus potential energy.
With distance $r_j$ from source $j$ and outward unit vector $\hat{\mathbf r}_j$, acceleration and potential per unit mass are given below. Particle motion, force vectors and grid depth use the same model. Grid depth is capped for readability; it is not a calculation of spacetime curvature.
The softening length is fixed at $s=10$ in sandbox mode and $s=18$ in single-source mode. Although the acceleration has the same form, softening lengths and input definitions differ, so the displayed numbers are not interchangeable without checking these conditions. Distance, speed, mass and time use model units, with no defined conversion to m, km/s or kg. The sandbox uses RK4 with a maximum step of 0.03 model time, reduced further near a source.
Each source has a capture radius of $1.5(4+0.55\sqrt{m_j})$. A captured particle stops being calculated; post-collision motion and mass merging are not simulated. Particles farther than 4000 from the origin stop as a display-domain condition, not an energy-based escape classification. Safety limits are 128 sources and 2048 particles.
The visible domain runs from −360 to 360 on each axis, but particles do not bounce at its edges and their speeds are not capped. They continue to be calculated outside the picture up to the stopping radius. Resizing the display does not change world positions or velocities. Shared links save current sources, active particle states and display settings and restore them paused. Trail history, elapsed time and captured particles are excluded.
The single-source model uses a fixed softening length s=18 to limit the force near the centre. Distance, velocity and GM use model units, not au or km/s. This is not a calculation of general-relativistic spacetime or geodesics.
$$\mathbf{a} = -\frac{GM}{r^2+s^2}\,\hat{\mathbf{r}}$$Consistent potential per unit mass, with zero at infinity:
$$\Phi(r) = -\frac{GM}{s}\arctan\left(\frac{s}{r}\right)$$Circular-orbit speed:
$$v_c = \sqrt{\frac{GM r}{r^2+s^2}}$$Escape speed at radius r:
$$v_{esc} = \sqrt{-2\Phi(r)}$$Negative specific energy denotes a bound trajectory; nonnegative energy denotes an unbound one. Some trajectories nevertheless stop near the centre. Noncircular trajectories in this softened model need not be exact Keplerian ellipses or hyperbolas.
$$\varepsilon = \frac{v^2}{2} + \Phi(r)$$Check: r=200, GM=40000, s=18 gives v_c≈14.0852 and v_esc≈19.9731. Tangential speed 14.1 and radial speed 0 give ε≈−100.0576, a nearly circular bound orbit. Turning radii are calculated from energy and angular momentum; leaving the picture is not classified as escape.
Velocity magnitude and direction: At the same speed, changing the tangential and radial components changes angular momentum and therefore the turning radii. Position angle changes the orbit's orientation, but in this centrally symmetric model the same radius and velocity components have the same energy.
Outside the picture is not escape: For GM=40000, r=320, tangential speed 14.1 and radial speed 0, ε≈−25.4634: the orbit is bound. Its formal apoapsis is approximately 1251.30. Leaving a small display does not make apoapsis infinite.
Fixed sources versus gravity assists: The source is fixed and there is no friction or propulsion, so specific energy is conserved. Approaching the source increases speed, but returning to the same radius restores the same speed. Energy changes in another reference frame during an encounter with a moving planet are not included.
Comparison with the ideal Newtonian model: For r much greater than s, the force approaches −GM/r². For unit-based satellite calculations, also check the assumptions and scope of the related orbital-mechanics tools.
Units and assumptions: Do not reinterpret the displayed values as au, km/s or solar masses. The central source is fixed and the test particle's reaction force is ignored. Drag, propulsion and relativistic effects are excluded.
Turning radii and the finite display domain: Turning radii are intersections of the effective potential Φ+J²/(2r²) with the initial energy; J is angular momentum per unit mass. Since the centre direction is undefined, drawing stops at r<6, even if the formal periapsis lies farther inward. Motion also stops beyond radius 4000 as a display-domain condition. Both stopping rules are separate from the sign of energy.
Numerical integration and preview: RK4 advances the trajectory with a maximum step of 0.03 model time, but does not guarantee exact long-term conservation. The faint line is a finite-time preview and may not show a complete period. Nearly circular conditions are rounded to the velocity input increment of 0.1.
Reference:MIT OpenCourseWare: Central Force Motion: Orbits provides background on central-force energy, angular momentum and ideal Newtonian orbits. The softened potential used here is derived by integrating this page's adopted force; it is not the same model as the reference's Newtonian equations.
Nearly circular: Set GM=40000, r=200, vθ=14.1, vr=0 and angle 0°. With s=18, circular speed≈14.0852, escape speed≈19.9731 and specific energy≈−100.0576. Periapsis is 200 and apoapsis approximately 200.83, giving a nearly circular bound orbit. The Nearly circular orbit button loads these inputs.
Compare the escape condition: Keep the other inputs and change vθ to 20.8: ε≈16.8574 is unbound, with infinite apoapsis. The Escape button loads this case. These are model-unit values, not the speed of a real planet.