# How to calculate height of a bouncing ball? [duplicate]

I'm wanting to create a basic physics engine for a Computing project, simulating the behaviour of a bouncing ball.

What equations and forces do I need to incorporate to calculate the height a ball will rebound to from the height that it is dropped?

If I drop a ball from 5m, what equation do I plug it into and what other factors will I need to include to calculate the height it will return to or how do I find the lost energy?

• Will it be 1-D or 2-D ? – Yuzuriha Inori Mar 27 '18 at 8:38
• It only has to move in one direction for what I'm interested in down; up and down – Charlie Mar 27 '18 at 8:42
• I might add in other factors later on but that's dependant upon time I have available – Charlie Mar 27 '18 at 8:42
• I get it. No translatory motion. Only up and down. – Yuzuriha Inori Mar 27 '18 at 8:43
• -1 No research effort. See also Help with my bouncy ball lab (I know the factors just not how to approach them) – sammy gerbil Mar 29 '18 at 11:18

You might want to consider the following things :

1. The equations of motion, to calculate the instantaneous velocity $v$ and the distance traveled $s$.

$$v=u+gt$$ $$s=ut+\frac12gt^2$$ $$v^2=u^2+2gs$$

1. The air resistance which is directly proportional to the instantaneous velocity squared $v^2$. The proportionality constant $k$ would depend upon air density $\rho$, drag coefficient $C_d$ and surface area $A$ of the ball.

$$F_r=kv^2=\frac12 \rho C_d A v^2$$

1. The coefficient of restitution $e$. It will calculate what velocity $v'$ the ball will start jumping with again, given that it hits the floor with velocity $v$. And this has to be applied recursively, each time the ball hits the floor.

$$v'=ev$$

1. If you want to simulate a large height, you might want to consider a variable air resistance through the fall and rise (look here for details on that), and also a variable gravitational field.

$$g'=g\left(1+\frac hg\right)^{-2}$$

I guess this is enough for a simple simulation. Right now, no other factor is coming in my mind.

As for the loss of energy, at every step, calculate the height the ball is reaching and calculate the potential energy. Subtract the previous potential energy and you will get the loss in the energy for that rise and jump.

• Could you add an example so its easier for me to understand how this is implemented? – Charlie Mar 27 '18 at 12:44
• And what about for different types of floor surface? – Charlie Mar 27 '18 at 13:10
• Ah sure, but give me some time. Btw, the coefficient of restitution $e$ encompasses different floor material and ball material combinations – Yuzuriha Inori Mar 27 '18 at 16:20