# Simple mathematical model for a bouncing ball

I started coding a physics program that simulates gravity - specifically a bouncing ball - and I've already learned a lot researching the topic but the bounce still doesn't look quite right. I need a simple formula that captures a bounce. There may be questions similar to this, but I wanted advice on whether the following logic makes sense. I'm also not very math or physics-savvy, so if you can explain it in a way that a law student would understand or link me to some appropriate material, I'd appreciate it a lot.

So far I have something like this:

1. The downward fall from a stationary position:

 Velocity (going down) = 0.5 * 9.8 * time^2

Where time = seconds counting up.

2. Bounce:

 Velocity (going up) = Coefficient of Restitution * Velocity Just Before Bounce

3. Upward Rise:

I reversed the first formula so that the ball is essentially "rewinding time", so to speak.

 Velocity (going up) = Coefficient of Restitution * 0.5 * 9.8 * time^2

Where time = seconds counting down from wherever the "counting up" stopped, so that
the velocity decreases to zero at the same rate that it increased during free fall.

4. Peak

 Velocity (going down) = 0.5 * 9.8 * time^2

Where time = seconds counting up before the ball reaches the peak.


Step 1 and Step 2 seem to work fine, but Step 3 makes the balls look unnatural, like they're being pulled up and hovering a bit before dropping. And I haven't been able to find anything that explains the upwards movement of a bouncing ball (and how it differs from the fall).

The only way I've been able to smooth out the "hovering" effect of the ball when it reaches its post-bounce peak is to start the free fall counter (time) right before the ball reaches the peak so that it gains enough velocity to drop faster....if that makes sense. That's what I mean by my comment in Step 4.

P.S. I'm not planning on accounting for friction, ball shape, density, etc. unless it would be necessary to do so. The only "extra" thing I've added in so far is the ability to change the ball's elasticity.

Your formula's wrong. You've got $v=\frac12 at^2$, whereas that's the formula for $y$=height. Velocity's actually $v=at$ (with $a=9.8\mbox{m/sec}^2$).

The equation of motion for the ball from the time it bounces till the time it hits the ground again is

$$y = v_0t - \frac{1}{2}at^2$$

where ground level is $y=0$, and $v_0$ is the velocity going up after adjusting for the coefficient of restitution, and $t$ is the time since the bounce.

This equation will take the ball through its peak and back to the ground. When it reaches the ground again, it will have velocity $v_0$, since you're ignoring air friction.

To determine the amount of time between bounces, set $y=0$ and solve for $t$ and you'll find that $$t = \frac{2v_0}{a}$$

• Awesome, I couldn't find this anywhere! Now I need to figure out how to integrate this into the program, thanks! – a soft pillow May 22 '16 at 17:20