🌍 Orbit Simulation

πŸ”¬ Physics Behind the Simulation

🌍 Newtonian Gravity

Every object with mass attracts every other object. In our case, the orbiting body is attracted toward a central mass (like a planet or star).

Equation: F = G Γ— M Γ— m / rΒ²

This results in acceleration:
a = F / m = G Γ— M / rΒ²

In vector form:
πšβƒ— = βˆ’ (G Γ— M) / |𝐫⃗|Β³ Γ— 𝐫⃗

βš™οΈ Numerical Methods

Simulations use step-by-step calculations to update motion using integration methods.

Euler’s Method

v(t+Ξ”t) = v(t) + a(t) Γ— Ξ”t
r(t+Ξ”t) = r(t) + v(t) Γ— Ξ”t

βœ… Fast but error-prone over time

Runge-Kutta (RK4)

More accurate: takes 4 slope samples per step.

βœ… Ideal for curved paths like orbits

πŸ”’ Constants Used