The above diagram plots various the energies involved as a function of height above the ground (z). The line representing "Total Energy" is flat, because total energy is conserved (i.e., is constant). Potential energy (U(z)) is plotted in red: for z>0, U(z)=mgz, for z<0 U(z) is infinite (the bouncing ball cannot penetrate the ground). Total energy is the sum of kinetic energy and potential energy: thus kinetic energy is what you have to add to potential energy to get the constant total energy. Kinetic energy must be positive, so the only places the particle can actually go are where U(z)<E. The points on the edge of the allowed region (where U(z)=E, i.e., z=0 and zmax) are called turning points. There the kinetic energy is zero, and so the velocity of the particle is zero. Just prior to reaching zmax, the particle is moving up (positive velocity). Just after reaching zmax the particle is moving down (negative velocity). At zmax the particle is momentarily at rest. The below plots the position and velocity as functions of time.