...
running...
How to use
Pick a preset, then change launch speed, angle, height, mass, size or wind. Press Fire again to leave a ghost trail and compare shots. The dashed blue line is the vacuum parabola; the orange path is the real flight with drag. The bottom graph scans range against launch angle for the current settings, so you can see the best angle drop below 45 degrees when drag is on.
The science
Model. A point mass of mass m moves under gravity g and quadratic drag relative to the air (wind w along x):
a = -g y^ - (rho Cd A / 2m) |v - w| (v - w), A = pi d^2 / 4, rho = 1.225 kg/m3
Vacuum. Without drag the range from height h is R = (v cos a / g)(v sin a + sqrt(v2 sin2 a + 2 g h)) and the best angle from the ground is 45 degrees. With drag the best angle is lower and the descent steeper than the climb.
Terminal speed. Drag balances weight at v_t = sqrt(2 m g / (rho Cd A)). Heavy compact bodies stay close to the vacuum parabola; light large ones fall short.
Energy. The specific energy v2/2 + g y falls by exactly the work of the drag force; a check verifies this balance numerically.
Simplifications. Constant Cd (real Cd varies with Reynolds number), no spin or Magnus force, uniform wind, constant air density, flat ground. Integration is classical RK4 at a 1/480 s step.