A simulation-first physics engine for modeling motion in multi-body gravitational systems.
This system takes initial conditions (position, velocity, bodies, units) and deterministically propagates them through time to produce:
- Full trajectory evolution
- System interaction analysis
- Event classification (capture, escape, impact, etc.)
- Energy and gravitational state transitions
It is not a visualization tool with physics added on top — the visualization is a projection of the simulation core.
Turn initial conditions into complete system behavior
Instead of approximating outcomes, this engine:
- Simulates N-body gravitational interaction
- Tracks dominant gravitational influence
- Detects state transitions in-flight
- Produces deterministic trajectory outputs
Inputs → Normalization → Propagation → Analysis → Events → Visualization
Structured simulation definition:
- Origin / target bodies
- Initial velocity + angle
- Altitude / position
- Unit system (distance + time)
- Simulation constraints
All inputs are converted into canonical units:
- Distance → meters
- Time → seconds
- Velocity → m/s
This ensures consistent physics regardless of user input units.
The core system:
- Multi-body gravitational acceleration
- Pairwise force calculations
- Numerical integration over time
- Adaptive stepping (energy tolerance aware)
Supports:
- Configurable time steps
- Long-duration simulations (days → years)
- Stability + divergence detection
Each timestep produces a full system snapshot:
- Position / velocity vectors
- Relative distances (origin, target, sun)
- Specific orbital energy
- Dominant gravitational body
- Per-body influence breakdown
The engine classifies meaningful transitions:
- SOI entry / exit
- Capture
- Escape
- Closest approach
- Surface impact
- Numerical instability
These are not inferred after-the-fact — they are detected during simulation runtime.
Simulation produces:
- Full trajectory path
- Time-series system states
- Distance + velocity metrics
- Energy changes
- Gravity analysis
Example outputs include:
- Closest approach distance
- Total travel time
- Max / min velocity
- SOI transitions
- Final system dominance
Canvas-based rendering system:
- Orbital paths
- Planetary motion
- Influence zones (SOI)
- Velocity vectors
- Probe trajectory
This layer is decoupled from simulation logic.
- Earth → Mars trajectory modeling
- Hohmann transfer simulation
- Escape velocity validation
- Multi-body gravitational influence mapping
- Long-duration system evolution (years)
- Custom trajectory experimentation
No closed-form shortcuts — everything is propagated numerically
Handles multi-body interaction with dynamic influence shifts
Returns:
- Trajectory
- Events
- Metrics
- Physics state
Given the same inputs → same results
The system is strongly structured:
- Typed inputs
- Normalized internal representation
- Explicit output contracts
Example: Trajectory inputs, normalized states, and results are all formally defined
- Orbital mechanics experimentation
- Trajectory planning systems
- Physics education / visualization
- Simulation backends for aerospace tools
- Game / simulation engine integration
- Analytical modeling of dynamic systems
- Simulation-first — not UI-first
- Deterministic over heuristic
- Explicit over implicit
- Composable system layers
- Separation of physics and rendering