A Javascript-based N-body simulation for calculating gravitational and electrostatic interactions between an arbitrary number of particles
- Adjustable simulation parameters
- G, K, timestep, mass, velocity, etc.
- Body tracking to visualize relative velocity
- Body collisions
- Elastic, inelastic, perfectly inelastic
- Forces
- Gravity
- Electrostatic
- Spring (softbody)
- Conservation laws
- Momentum, energy, charge
- Various draw options
- Trace paths
- Color based on speed
- Gravitational field visualization (VERY SLOW)
- Can show the Lagrange points
- Center of mass
- Velocity, acceleration vectors
- etc.
- Presets and generators
- Planets
- Planets with moons
- Galaxy collision
- Solar system generator
- Binary system generator
- Soft bodies (hit it with other objects)
- Many others
- Interactive
- Kinematics
- Position, velocity, acceleration - particle motion
- Dynamics
- Gravitational field (uniform acceleration)
- Newton's laws
- Spring forces (softbody)
- Circular motion and gravitation
- Gravity calculated based on Newtonian gravity
- Centripetal force and acceleration - galaxy and other orbit generators
- Energy
- Conservation of energy
- Gravitational potential energy
- Momentum
- Conservation of momentum
- Elastic and inelastic collisions
- Simple harmonic motion
- Springs (softbody)
- Electrostatics
- Electric force
- Conservation of charge
- Electric field and potential Soon(tm)
- Magnetism
- Magnetic fields and Lorentz force Soon(tm)
- U/V: toggle sidebar
- Arrows/WASD/Mouse: pan view
- Space: cycle tracked body
- Esc: cancel tracking
- Home/0: center viewport
- Scroll/Z/X: zoom in/out
- Others listed in control panel
- Single core CPU-bound, very inefficient
- Setting G to 1 helps with large numbers of bodies
- EM forces
- Resonant orbit generator
- Particle trajectory prediction
- Move calculations to gpu (especially field calcs)
- Implement optimized algorithms
- 3D version