1 # Bullet shot vertically up
3 # z'' = -g -af = -g -k*v^2
4 # with k = 1/m * 1/2 * A * c.w * rho
6 coefficient.1(-1) -> -g # gravity
7 coefficient.2 -> k # coefficient of friction
8 coefficient.3(+1) -> v0 # initial vertical speed
10 iintegrate (-g, 10*: friction) -> -v
16 multiply (-v, -v) -> v^2
17 cmultiply (k, v^2) -> kv^2
19 # make sure friction acts against the direction of propagation
22 GT0: -kv^2 # v > 0 => moving upwards
23 LT0: kv^2 # v < 0 => moving downwards
26 Output (friction) -> out.y