2D cross-section and plan view. Find the launch angle and spin that clear a 1.8 m wall at 9.15 m and still dip under the crossbar.
The science
Model. Newton's second law for the ball (mass m = 0.43 kg, radius r = 0.11 m, area A = πr²), integrated with a fixed-step RK4 (2 ms) in 3D:
m dv/dt = m g − ½ ρ A Cd |v| v + ½ ρ A CL |v|² · (ω×v)/|ω×v|
The lift (Magnus) coefficient uses the common empirical fit CL = 1 / (2 + 1/S) with spin parameter S = rω/|v| (Goff & Carré, 2009). Backspin gives lift, side-spin gives curl: with the ball moving along +x, ω×v points sideways for a vertical spin axis.
Geometry. The wall stands 9.15 m from the ball (Laws of the Game), the goal is 7.32 m wide and 2.44 m high. Each wall player is modelled as a 0.5 m wide column of the chosen height; the ball is blocked if its centre passes the wall plane below the wall top (plus one ball radius) inside the wall's width.
Why the window is narrow. Over the wall the ball must still be falling fast enough to get under the crossbar 10–11 m later. The scan button measures the range of launch elevations that do both, in vacuum (closed form) and with your drag and spin (RK4).
Numerical check. With ρ=0 and no spin the RK4 height at the wall equals the closed-form parabola y = y0 + vyt − ½gt²; the difference (a few micrometres) is shown live in the readouts and is asserted by test_numeric.js.
Honest simplifications. Constant Cd (the real value drops sharply with speed, the “drag crisis”, and knuckle-ball effects are not modelled); spin is constant (real spin decays by a few percent per second); no wind; flat pitch; no goalkeeper; the ball does not bounce off the wall. Cd = 0.25 and ρ = 1.2 kg/m³ are typical values, not measurements of a particular ball. Defenders are generic mannequins.