Skip to content

About

Stuff for class

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

livecode-projectile


A simple implementation of an Euler integrator for projectile motion. This program was written (mostly) live, in lecture for SOFE-2850U in Fall 2017.

Next week, we will add drag and stopping conditions. The drag will make the output more interesting. Implementing stopping conditions in a generic way force us to introduce lambdas and templates.

Compilation

Compile with

clang++ -std=c++14 -o projectile projectile.cpp

or

g++ -std=c++14 -o projectile projectile.cpp

and run as

./projectile

and watch your terminal fill with numbers.

Output

The output will be six columns of numbers with the following order:

time [s], x-position [m], y-position [m], x-speed [m/s], y-speed [m/s]

Plot the, you get the familiar parabolic trajectory, which will depend on your constants:

About

Stuff for class

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages