This pitch trajectory simulator is built on a Python port of Professor Alan Nathan's 3D Trajectory Calculator. Dr. Nathan's pioneering research on baseball aerodynamics — including drag, Magnus force, and spin effects — forms the foundation of our physics engine. His original calculator and resources are available at baseball.physics.illinois.edu.
Note: MLB Statcast provides only partial spin data (spin rate and spin axis), which is insufficient to fully determine the angular velocity vector. This simulator estimates the missing gyrospin component to reconstruct the complete 3D spin vector (backspin, sidespin, and gyrospin). Environmental parameters (air density, temperature, etc.) are held constant at standard conditions.
Features
Real pitch data from MLB Statcast (Hawk-Eye tracking system)
3D trajectory visualization with spin and no-spin comparison
Pitch overlay for comparing multiple pitches
Spin decomposition into backspin, sidespin, and gyrospin components
MP4 video export (real-time and slow-motion)
Trajectory integration using the 4th-order Runge-Kutta (RK4) method
The BSG coordinate diagram is being revised. The previous figure contained inaccuracies in the orthogonality of the basis vectors. A corrected version will be available soon.