Loading...
Graphics Quality
๐Ÿ”‹
Low
Flat colors, no bloom, basic geometry. Best for older hardware.
โšก
Medium
Smooth shading, soft bloom, orbit lines. Balanced performance.
๐Ÿ’Ž
High
Real planet textures, strong bloom, atmospheric glow, corona effects.
Particle Sandbox Limit
Max Particles 100 = no limit
10 000
Background Stars
Star Count affects all 3D scenes
3 000

Solar System Simulation

Physics, Mathematics, and Numerical Methods

Adam Machรกฤek

High School Presentation โ€ข 2026

Press โ†’ or click to continue

What's on the Agenda?

1Gravitational Physics
2Kepler's Laws
3Numerical Methods
43D Simulation

๐ŸŽฏ Presentation Goal

Understand how we can simulate planetary motion in the Solar System using physical laws and programming.

๐Ÿ’ก Why is it important?

NASA uses the same principles for mission planning, satellites for navigation, and scientists for asteroid prediction.

Newton's Law of Universal Gravitation

Every two objects in the universe attract each other with a force directly proportional to their masses and inversely proportional to the square of the distance between them.

$$\vec{F} = G \frac{m_1 \cdot m_2}{r^2} \hat{r}$$
Newton's Law of Universal Gravitation (1687)

Variables

  • G = 6.674 ร— 10โปยนยน Nยทmยฒ/kgยฒ (gravitational constant)
  • mโ‚, mโ‚‚ = masses of bodies [kg]
  • r = distance between bodies [m]
  • F = gravitational force [N]

๐ŸŒ Example: Earth-Sun

Sun Mass: 2ร—10ยณโฐ kg

Distance: 150 million km

Force: 3.54 ร— 10ยฒยฒ N

Kepler's Laws of Planetary Motion

1st Law (Ellipses)

Planets orbit in ellipses with the Sun at one focus.

2nd Law (Areas)

A line joining planet and Sun sweeps equal areas in equal times.

3rd Law (Periods)

$$T^2 = \frac{4\pi^2}{GM} a^3$$

The square of the orbital period is proportional to the cube of the semi-major axis.

Johannes Kepler (1571โ€“1630) derived these laws from Tycho Brahe's observations

Equations of Motion

From Force to Motion

Combining Newton's Law of Gravitation and Newton's Second Law (F = ma) gives us:

$$\vec{a} = -\frac{GM}{|\vec{r}|^3} \vec{r}$$
Gravitational Acceleration

This is a 2nd order differential equation that we must solve numerically.

$$\frac{d^2\vec{r}}{dt^2} = -\frac{GM}{|\vec{r}|^3} \vec{r}$$

Decomposition into Components

// Distance from Sun r = โˆš(xยฒ + yยฒ) // Acceleration in x direction aโ‚“ = -GM ร— x / rยณ // Acceleration in y direction aแตง = -GM ร— y / rยณ // Velocity update vโ‚“ = vโ‚“ + aโ‚“ ร— ฮ”t vแตง = vแตง + aแตง ร— ฮ”t // Position update x = x + vโ‚“ ร— ฮ”t y = y + vแตง ร— ฮ”t

Numerical Integration Methods

Differential equations usually do not have analytical solutions. We must solve them numerically โ€” in small time steps.

MethodAccuracyEnergy ConservationComplexity
EulerO(ฮ”t)Poor โŒSimple
Velocity VerletO(ฮ”tยฒ)Excellent โœ“Medium
Runge-Kutta 4O(ฮ”tโด)GoodHigher
LeapfrogO(ฮ”tยฒ)Excellent โœ“Simple

For orbital mechanics, we use symplectic integrators (Verlet, Leapfrog), which conserve energy.

Velocity Verlet Algorithm

Algorithm Steps

$$\vec{v}_{n+\frac{1}{2}} = \vec{v}_n + \frac{\Delta t}{2} \vec{a}_n$$
1. Half velocity step
$$\vec{r}_{n+1} = \vec{r}_n + \Delta t \cdot \vec{v}_{n+\frac{1}{2}}$$
2. Full position step
$$\vec{a}_{n+1} = f(\vec{r}_{n+1})$$
3. Calculate new acceleration
$$\vec{v}_{n+1} = \vec{v}_{n+\frac{1}{2}} + \frac{\Delta t}{2} \vec{a}_{n+1}$$
4. Complete velocity step

Code Implementation

function verletStep(planet, dt) { // 1. Half velocity step planet.vx += 0.5 * planet.ax * dt; planet.vy += 0.5 * planet.ay * dt; // 2. Full position step planet.x += planet.vx * dt; planet.y += planet.vy * dt; // 3. New acceleration const r = Math.sqrt( planet.x**2 + planet.y**2 ); const a = -GM / (r**3); planet.ax = a * planet.x; planet.ay = a * planet.y; // 4. Complete velocity planet.vx += 0.5 * planet.ax * dt; planet.vy += 0.5 * planet.ay * dt; }

๐Ÿช Simulation

Time:Year 0
Method:Verlet
Planets:8

Interactive 3D Simulation

Planet Name

Planet photo

Description goes here.

Fact goes here.

Solar System Explorer โ€” Click a Planet!

Galaxy Simulation (Particle System)

โšซ Black Hole Mode

Particles are pulled towards a central point. They gain a reddish hue as they approach the "event horizon".

๐Ÿ‘† Click and drag to spawn particles!

Particle Physics Sandbox

Real World Applications

๐Ÿš€ Space Missions

NASA uses similar simulations to plan trajectories for probes like Voyager, New Horizons, or Mars missions.

Gravity assists save fuel using a "slingshot" around planets.

๐Ÿ›ฐ๏ธ GPS Satellites

32 GPS satellites must know their exact position. The same gravitational calculations are used.

Accuracy: ยฑ3 meters on Earth

โ˜„๏ธ Earth Protection

Tracking asteroids and calculating collision risks. The DART mission successfully altered an asteroid's orbit!

~2,300 potentially hazardous asteroids

๐ŸŽฎ Also in Games!

Games like Kerbal Space Program use realistic orbital mechanics. Try planning space missions!

Summary

๐Ÿ“š What We Learned

  • Newton's law of gravitation describes the attraction of bodies
  • Kepler's laws describe the elliptical orbits of planets
  • We solve differential equations numerically
  • Velocity Verlet conserves system energy
  • 3D visualization helps understand dynamics

๐Ÿ”ง Technologies Used

  • Three.js โ€“ 3D graphics in the browser
  • WebGL โ€“ hardware acceleration
  • GLSL Shaders โ€“ effects and lighting
  • JavaScript โ€“ physics calculations
  • MathJax โ€“ beautiful equations

Thank you for your attention!

Adam Machรกฤek โ€ข 2026

Universe Sandbox

โ˜€๏ธ Pick an object, click canvas to place, then drag to set velocity!

The Three-Body Problem

Why it's unsolvable

For two bodies, Newton's laws yield a clean closed-form orbit. Add a third body and the system becomes chaotic โ€” tiny differences in initial conditions explode exponentially. Henri Poincarรฉ proved in 1887 that no general analytical solution exists. The trajectories are non-integrable.

Chaos in practice

Real systems โ€” binary stars with a planet, the Sun-Earth-Moon system, spacecraft trajectories โ€” must be solved numerically. Long-term prediction breaks down. Even the solar system is chaotic on ~100 million year timescales.

Lyapunov exponent > 0 No closed-form solution Sensitive initial conditions

Special solutions & workarounds

Lagrange points (1772): stable equilibria for restricted 3-body. Figure-8 orbit (Chenciner & Montgomery, 2000): one exact periodic solution exists. Modern approach: symplectic integrators + long double precision for spacecraft. Machine learning is now being explored for trajectory prediction.

LIVE 3-BODY SIMULATION
๐ŸŽฎ Cosmic Toys
โ˜€ SOLAR MUNCH Score: 0
โ˜€
Solar Munch
Move your sun with the mouse.
Eat smaller suns, avoid bigger ones!
โ˜„ GRAVITY SLINGSHOT
drag to launch โ€ข
๐ŸŽจ PLANET PAINTER click planet to paint
โœ•

Bonus: Blender Solar System Render!

1 / 15