This tool simulates the two-dimensional gravitational orbit of a planet or any celestial body around a central mass, such as the Sun, using Newtonian mechanics.
Users specify the central mass, planet mass, initial distance from the center (in AU), initial tangential velocity, simulation duration, and number of time steps. The tool numerically integrates the equations of motion to compute the trajectory, supporting circular, elliptical, and hyperbolic orbits.
The motion is governed by Newton's law of universal gravitation:
\[ \vec{F} = -\frac{G M m}{r^2} \hat{r} \]
leading to the acceleration components:
\[ a_x = -\frac{G M x}{r^3} \quad , \quad a_y = -\frac{G M y}{r^3} \]
where \( r = \sqrt{x^2 + y^2} \), \( G = 6.67430 \times 10^{-11} \) m³ kg⁻¹ s⁻² is the gravitational constant, M is the central mass, and (x, y) is the position of the orbiting body relative to the center.
Initial conditions place the planet at (r₀, 0) with velocity perpendicular to the position vector (0, v₀). Numerical integration (Euler method) updates position and velocity over time.
The tool displays the complete orbital path, an interactive animation of the planet's motion (with visible planet marker distinct from the path), and a 3D animated view of the orbit. It correctly handles elliptical orbits, showing faster motion near periapsis and slower motion near apoapsis, in accordance with Kepler's laws.
Ideal for exploring orbital mechanics, Kepler's laws, exoplanet dynamics, satellite trajectories, and educational demonstrations in physics and astrophysics.