19. Volleyball – solution and hints for the example
The motion of the ball after a serve in volleyball is a projectile launched at an angle from some initial height, in this example a height of 1.8 m. In the following picture the path of the ball is shown as a black curve:
Figure 1: The motion of the ball during a volleyball serve – projectile motion
A note for the easier version of the task:
For users who want a simpler version of the task, it is recommended to focus on the basic parameters and to assume that the ball reaches its maximum height exactly above the net (at the coordinate of the net). This approach removes the need to analyse the motion of the ball in the horizontal direction and makes it possible to solve the task with less complex formulas. A more detailed example for this version can be found in task no. 19 on the page Branching in a program – examples. We will look at the motion of the ball in the vertical direction. From the initial height of 1.8 m the ball moves vertically upwards with the initial speed v0 (entered by the user) and reaches some maximum height Hmax (see the picture).
Hmax=1.8 + dH |
(1) |
g = 9.81 m/s2
From the well-known formula for uniformly accelerated motions = 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 = v0*t - g*t2 / 2 |
(2) |
Hmax = 1.8 + v0*t - g*t2 / 2 |
(3) |
then we can say that the ball will go over the net, otherwise it will not. The time t in which the ball reaches Hmax can be found from the formula for the current speed in uniformly accelerated motion:
v = v0 + a*t
Since this is a projectile looked at only in the vertical direction, the speed when the maximum height is reached is equal to zero, and the acceleration is the gravitational one (g). The minus sign shows that the direction of the speed v0 is opposite to the direction in which gravity acts.
0 = v0 - g*t |
From here the unknown time t can be found |
t = v0 / g |
(4) |
Additional explanations
- What is alphaRad?
The angle alpha is given in degrees, but for trigonometric functions in programs the value of the angle in radians is often used. alphaRad is the value of the angle converted from degrees to radians and it is computed as:
alphaRad=alpha⋅π/180 - Why is cosine used for the X component and sine for the Y component?
The direction of the initial speed of the ball v0 is defined by the angle α. The components of the speed v0X and v0Y are the projections of the initial speed onto the horizontal and the vertical axis:- v0X=v0⋅cos(alphaRad) because cosine is related to the adjacent (horizontal) side of a right triangle.
- v0Y=v0⋅sin(alphaRad) because sine is related to the opposite (vertical) side of a right triangle.
- About the quadratic equation:
The symbols a, b and c in the quadratic equation:
a⋅t2+b⋅t+c=0
may cause confusion because they are not directly related to the original symbols from physics. In the task, these coefficients are defined from the physical parameters:- a=G/2: half of the gravitational acceleration.
- b=−v0Y: the negative value of the initial vertical speed.
- c=H0: the initial height of the ball.
The procedure for solving the task (the algorithm)
- Define the following data: HM, v0, HMax, dH, g;
- The user enters v0 and HM
- Set the value of g
- Compute the time t with formula (4)
- Compute the maximum height of the ball with formula (3)
- Using an if-else statement, decide whether the ball goes over the net or not
Note: A harder version of the task (see task 32) would ask whether the ball will go over the net, not only whether the height reached by the ball is greater than the height of the net. Then the current height of the ball at the moment when the ball is at the x coordinate of the net would have to be found. The current height computed in this way is H <= HMax.
To compute it, the horizontal component of the initial speed must be entered, as well as the horizontal (X) distance of the net from the place where the ball is hit.
Practical use
Analysing the motion of the ball during a volleyball serve is not only a theoretical task – it is widely used in sports science and in training athletes. With this model, coaches and players can optimize their serves, increase precision and adapt their strategy to the situation on the court. Here are some practical uses:- Optimizing the serve:
- The model lets players analyse how the angle and the speed of the serve affect whether the ball goes over the net. By experimenting with the initial speed and the angle, players can adjust their technique to reduce the chance of a mistake.
- Developing competition strategies:
- By analysing different initial conditions, it is possible to identify the best serves for different situations in the game, such as avoiding the opposing team's blocks or making the reception harder.
- Technical analysis of players:
- With sensors that measure the initial speed and angle, coaches can analyse a player's technique and give precise recommendations for improvement.
- Visualization for training:
- Implementing the model in software with a graphical simulation lets players see the motion of the ball in real time, which helps them understand the effects of their movements better.
- Use in education:
- The task can serve as an example for students who study physics, sports biomechanics or programming, connecting theory with practical and interesting situations.
Back to the page: Branching in a program – examples
