...
running...
The science
Model. A rigid arm of length L = a + b pivots on a tower of height h. A counterweight m_c sits at distance a on the short side; a massless rigid sling of length l carries the ball m_p at the end of the long side b. With arm angle psi and sling angle phi (both measured from the horizontal) the Lagrangian has the mass matrix:
M11 = A + m_p b2, M12 = m_p b l cos(phi - psi), M22 = m_p l2, A = I_arm + m_c a2
and the equations of motion are M11 psi'' + M12 phi'' = m_p b l sin(phi - psi) phi'2 - V_psi and M12 psi'' + M22 phi'' = -m_p b l sin(phi - psi) psi'2 - V_phi, with gravity terms from V = g (m_c y_c + m_a y_a + m_p y_p).
Energy transfer. The counterweight falls, the arm accelerates, and the sling lets the ball move on a much larger circle than the tip, so the ball is the fastest part. Energy is conserved, so the ball's kinetic energy cannot exceed what the machine gives up.
Release. The ball is let go when the direction of its velocity reaches the chosen flight-path angle. In vacuum the range from height y0 is x0 + vx (vy + sqrt(vy2 + 2 g y0)) / g; the best release angle is near 45 degrees but lower when the release point is high.
Simplifications. Rigid massless sling that never goes slack, a fixed counterweight, uniform arm, no friction, no ground sliding (the ball starts hanging), flat ground, optional quadratic drag for the flight. A study of a lever machine from classical mechanics, with an inanimate ball and no targets. Integration is RK4 at 0.5 ms.