A TypeScript + Three.js sandbox for visualizing ballistic trajectories. The first milestone is intentionally scoped to educational physics: gravity, aerodynamic drag, wind, and a simple powered-thrust phase.
- 3D trajectory visualization with Three.js.
- Orbit camera, ground grid, launch marker, impact marker, and animated projectile marker.
- Real-time playback telemetry for current velocity and acceleration magnitudes plus vector components.
- Presets for a generic projectile, mortar round, artillery shell, and a powered rocket phase.
- Controls for launch speed, elevation, azimuth, mass, drag coefficient, wind, thrust, and burn time.
- Separate projectile-style and booster-style starts:
- projectiles can begin with high muzzle velocity and no thrust
- boosters can begin at zero velocity and accelerate under thrust
- Thrust direction modes: current velocity vector or launch vector.
- Thrust curve modes: constant thrust or linear ramp-up.
- Selectable physics fidelity:
- flat or spherical Earth
- constant or altitude-dependent air density
- semi-implicit Euler or RK4 integration
- Core physics separated from rendering so additional vehicle models can be added later.
npm install
npm run devThen open the Vite URL printed in the terminal.
npm run builddocs/
ballistic-modeling-factors.md Roadmap of physical and environmental factors
src/
domain/
presets.ts Simulation presets and default values
physics/
simulation.ts Integration loop and force model
vector.ts Small vector math helpers
rendering/
trajectoryScene.ts Three.js scene and animation
ui/
controls.ts DOM form binding and metrics
main.ts App entry point
See docs/ballistic-modeling-factors.md for the broader modeling checklist.
- Add Earth rotation and Coriolis terms for long-range trajectories.
- Add mass flow and staging for booster-style vehicles.
- Add a layered atmosphere model with temperature, pressure, and speed-of-sound estimates.
- Add separate vehicle profiles for shells, rockets, and glide bodies.
- Add terrain collision instead of flat-ground impact only.
- Add comparison mode for multiple trajectories.
- The simulator is not calibrated against real weapon systems.
- Wind is modeled as a constant local vector, not a weather field.
- Drag coefficient is fixed over the whole flight instead of varying by Mach number.
- Powered flight uses thrust along the current velocity vector; it is not guidance logic.