Skip to content

About

C++ simulation of a 3D projectile trajectory using RK4 integration with air resistance. Includes a Python script to plot the output data.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Flight Trajectory Simulator (RK4)

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.

Project Structure

  • 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.

How to run it

First, make sure you have pandas and matplotlib installed:

pip install pandas matplotlib

About

C++ simulation of a 3D projectile trajectory using RK4 integration with air resistance. Includes a Python script to plot the output data.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages