A simple C++ project to simulate 3D projectile motion with air resistance using the RK4 (Runge-Kutta 4th order) algorithm.
I built this because standard physics problems always ignore air drag and treat everything as a basic parabola. I wanted to see how much realistic drag changes the trajectory and practice writing numerical integrators from scratch instead of using external libraries.
main.cpp— The C++ engine that calculates position and velocity over time using RK4 and outputs data.plot-data.py— Python script that reads the CSV and generates the visual plot.trajectory.csv— Output dataset containing raw spatial telemetry.trajectory.png— Rendered trajectory graph.
First, make sure you have pandas and matplotlib installed:
pip install pandas matplotlib