A ball bouncing down steps
The first part of the process is a ball in free flight from one step down to the next:
Consider gravitational potential energy mgh (where m is mass, g is the force of gravity, and h is the height) at the peak height H of the flight path over steps of height S relative to A and B:
EA=mg(H−S)EB=mgH
Consider kinetic energy 12mv2 at A and B:
EA=12mv2AEB=12mv2B
Some simple algebra gives:
vA=√2g(H−S)vB=√2gH
When in flight, the only force acting on the ball is gravity. Using Newton's law of motion relating force and acceleration F=ma and integrating with the initial conditions at A with t=0 gives:
∂∂t∂∂ty=−g∂∂ty=vA−gty=r+vAt−12gt2
where y is the height of the ball center and r is the ball radius. Now we can find the duration Tf of the flight, which ends when y(Tf)=y(0)−S:
r−S=r+vATf−12gT2f12gT2f−vATf−S=0Tf=vA+√v2A+2gSg
The second part of the process is a compressive bounce when the ball reaches the lower step:
Modelling the bounce by a damped harmonic oscillator gives an equation of motion, where d is the maximal squashing of the ball:
y=r(1−dsin(βt)e−γt)
Here β determines the speed of the bounce and γ determines the energy lost during the bounce. Using the boundary conditions vC=vB and vD=vA for a smooth transition from free flight to bouncing, and setting Tb to be the duration of the bounce (time of first return to initial y value), we can differentiate the equation of motion and solve for the unknowns:
∂∂ty=re−γt(γsin(βt)−dβcos(βt))vB=rdββ=vBrdTb=πβvA=re−γTbdβγ=−logvArdβTb
The time taken for the whole loop is T=Tf+Tb. Assuming the ball is initially spherical, and that volume remains constant, we can compute the squashing factor using the property of an ellipsoid that V=krxryrz assuming that rx=rz:
ry=yrx=√r3y
Implementing all these equations in the Haskell programming language using the Diagrams library for visualization gives some cute animated GIFs:
You can download the full source code for this post.