Calculating height of a ball formula based on bounce I'm trying to figure out a formula for the new height of a ball, up until it stops bouncing.
The time iteration between each could be for example one second; and gravity of course would be 9.8
I've tried doing research at different websites such as physics @ illinois.edu and whatnot; 
I want it to be regardless of properties of the ball and ground (such as material of the ball and ground). 
So assume height starts at 10 meters, after one second it would be x height, then after another second it would bounce and go up to x height, then go down to x height, back up to x height, etc. 
Assume it's bouncing straight up and down, so the only plane it moves on is the height plane. 
The reasoning behind this is for a programming application; however once I have the formula for the ball bounce I can write the program itself, I just need to figure out the formula.
 A: Excluding drag the equation for the height at time $t$ is
\begin{equation}h(t) = h_0 - \frac{1}{2}g(t-t_0)^2\end{equation}
This is zero (ie at the ground) when $t = \pm\sqrt{\frac{2h_0}{g}}+t_0$. In this case, $h_0$ is the height from which it is dropped, and $t_0$ is the time when it is dropped. So assume $h_0 = h$ is the initial height and $t_0=0$ is the start time.
It hits the ground for the first time at $t = \sqrt{\frac{2h}{g}}$. Then you need to figure out your $h_1$, the height of the second bounce. This depends on how much energy you're losing, but a reasonable model would probably be $h_{i+1} = ph_i$, where $0<p<1$, although this means you will bounce forever. At some point, some other physics will take over.
You need to figure out $t_1$ (or in general $t_i$). In general it is going to be:
\begin{equation}t_i = t_{i-1}+\sqrt{\frac{2h_{i-1}}{g}}+\sqrt{\frac{2h_{i}}{g}}\end{equation}
This is because $t_i$ is the time at the apex of each bounce, and the $\sqrt{\frac{2h_i}{g}}$ is the time from the apex to the floor or vice versa.
Then use this generalization of the initial equation:
\begin{equation}h(t) = h_i - \frac{1}{2}g(t-t_i)^2\end{equation}
In each case, $t$ will run from $t_i-\sqrt{\frac{2h_i}{g}}$ to $t_i+\sqrt{\frac{2h_i}{g}}$, except for the first one, which runs from $t=t_0(=0)$ (ie from the apex, not the floor).
A: R.H=h/4 [t2÷t1] ²
t1=Time of free fall 
t2=Time of flight
h=Free falling height
We can calculate the first Rebouce by this equation. 
