Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 2.03 KB

File metadata and controls

51 lines (37 loc) · 2.03 KB

3-Body Problem Simulator

An interactive, browser-based simulation of the three-body problem with realistic astrophysical units and dynamic visualisation. WORKS BEST ON PC OR LANDSCAPE MODE ON PHONE

Live demo: https://adilneaz.github.io/3-Body-simulator-/

Development Log

See the full Development Log for a detailed timeline of how this project was built.


✨ Features

  • Real physics using astronomical units (AU), solar masses (M☉), and km/s.
  • Interactive controls: set initial positions, velocities, and masses for each body.
  • Time control: adjustable simulation speed with pause/start buttons.
  • Smooth zoom and pan: mouse-wheel zoom (centred on cursor), right-click drag to pan.
  • Velocity-based trails: dynamic colour gradient (blue → red) based on each body's speed.
  • Dynamic speed legend: log-scaled, draggable, with real-time min/max speed in m/s.
  • Info panel: explains all units and controls; pauses simulation when open.
  • Presets: Sun–Earth–Jupiter, binary + probe, and a figure-8 approximation.

🎯 Educational Purpose

This simulator visualises chaos in orbital mechanics — small changes in initial conditions can lead to vastly different outcomes, a hallmark of chaotic systems in astrophysics.

Use it to explore:

  • Orbital stability and resonance
  • Gravitational scattering and capture/ejection
  • Sensitivity to initial conditions

🛠 How to Use

  1. Open the Live demo link above.
  2. Click in the canvas to place/select a body; drag to set its initial velocity vector.
  3. Adjust mass (M☉), position (AU), and velocity (km/s) from the control panel.
  4. Scroll to zoom, right-click and drag to pan.
  5. Open the Help tab for unit explanations and controls.

📜 License

MIT License © 2025 Adil Neaz
You are free to use, modify, and distribute this project, provided credit is given.


📬 Contact

Created by Adil Neaz — open to collaborations and academic discussion. Email: AdilF0rmalAcc0unt@gmail.com