32. A volleyball serve over the net (projectile motion) – explanation and hints

Unlike task number 19, where the horizontal component was not taken into account, here both components of the initial speed, v0X and v0Y, must also be found from the initial speed v0 and the angle alpha. The distance of the ball from the net in the X direction at the initial moment is also important. For the origin of the coordinate system we will take the point on the ground below the ball at the initial moment. Go back to the home page by clicking the picturePicture
The motion of the ball during a volleyball serve – projectile motion
Figure 1: The motion of the ball during a volleyball serve – projectile motion

A complete explanation of projectile motion can be found on the page: Projectile motion simulation (in Serbian)

In the same place you can also try an interactive simulation of projectile motion
Go back to the tasks: Branching in a program – examples The motion of the ball is actually a projectile launched from some initial height H0 (the height at which the player hits the ball). The player who hits the ball gives it an initial speed v0 whose vector is at some angle alpha to the horizontal direction. The horizontal and vertical components of the initial speed can now be found.
​ 

v0X=v0*Math.cos(alphaRad);

v0Y=v0*Math.sin(alphaRad);

where alphaRad is the value of the angle in radians.
If we look only at the horizontal direction, the motion is uniform and the projection of the ball onto the horizontal direction moves at a constant ​ speed 

vX=v0X

If the distance xM of the net from the serving player is known, then using the speed in the horizontal direction v0X we can find the time tM the ball needs to reach the x coordinate of the net:

tM = xM/v0X

(1)

​We will look at the motion of the ball in the vertical direction. From the initial height H0 the ball moves vertically upwards with the initial vertical speed v0Y (computed from v0 entered by the user) and reaches some maximum height Hmax (see the picture).


​

Hmax=H0 + dH

(2)
where dH is the change of height, which we can find with the formula for uniformly accelerated (decelerated) motion in the Earth's gravitational field, where the acceleration is

g = 9.81 m/s2

From the well-known formula for uniformly accelerated motion

s = v0*t - a*t2 / 2

if we put g instead of a, and dH instead of s, because the change of height is actually the distance travelled in the vertical direction, we get:

dH = v0Y*t - g*t2 / 2

(3)
If we substitute equation (3) into (2), we get

Hmax = H0 + v0Y*t - g*t2 / 2

(4)
If this maximum height is greater than the height of the net (HM, coloured red in the picture above),
in this case we still cannot say that the ball will go over the net, because the ball does not have to reach its maximum height at the x coordinate of the net, as we assumed in task no. 19. That is why we have to find the height H the ball will have at the moment when it is at the net, i.e. at the coordinate xM, and that will happen after the time tM from the hit (equation 1).
​To find this height H we add the change of height dH to the initial height, and to find dH we put into equation (3) the time we computed with formula (1)

dH = v0Y*tM - g*tM2 / 2

and further

H = H0 + v0Y*tM - g*tM2 / 2

(5)
If this height H is greater than the height of the net (HM, coloured red in the picture above),
we can say that the ball will go over the net when H>HM, otherwise it will not

Finding the maximum range

We can find the range if we look at the motion in the horizontal direction with the speed v0X, which is constant, so:
​

D = v0X * tD

where tD is the time from the hit until the ball falls to the ground. This time can be found by adding up the time the ball needs to reach the maximum height t1, to come down to the same height from which it was hit t1 (the same time is needed) and the time the ball then needs to fall to the ground, i.e. to come down vertically by H0.

tD = 2 * t1 + tP

The time t1 is the time the ball needs to reach the maximum height, i.e. to rise by dH. When it reaches the maximum height, the speed in the vertical direction is zero, so from

0 = v0Y - G*t1

we get the time t1

t1 = v0Y / G

The time tP can be found if we look at the vertical motion of the ball's projection onto the Y axis from the height H0 to the ground:

H0=v0Y*tP+G*tP2/2;

G*tP2/2+v0Y*tP-H0=0;

This is a quadratic equation, and to solve it we set

a=G/2

b=v0Y

c=-H0

Solving the quadratic equation for tP we get

tP=(-b+√b2-4*a*c)/(2*a);

Finally

D=v0X*(2 * v0Y/G + tP)

(6)

The procedure for solving the task (the algorithm)

  1. Define the following data: HM, xM, v0, alpha, H, HMax, dH, g, tM, v0X, v0Y, t1, tP, D, where alpha is the angle in degrees between the vector of the ball's initial speed and the x axis
  2. The user enters H0, v0 and HM, the angle, xM
  3. Set the value of g
  4. Find the angle in radians, alphaRad
  5. Find the projections of the initial speed onto the x and y axes, i.e. v0X and v0Y
  6. Find the time tM the ball needs to reach the net
  7. Find the height H at which the ball will be when it reaches the net, using formula (5)
  8. Using an if-else statement, decide whether the ball goes over the net or not
  9. Compute the maximum height of the ball with formula (4)
  10. Find the maximum  range D
​
Note: An easier version of the task would ask whether the ball will go over the net assuming that the ball reaches its maximum height at the net, i.e. at its x coordinate, because then it is enough to find HMax, and finding it does not require analysing the motion in the x direction. See task no. 19 on the page Branching in a program – examples