Equations for aiming tennis ball parabolic motion

  • Context: Undergrad 
  • Thread starter Thread starter markofjohnson
  • Start date Start date
  • Tags Tags
    Ball Motion Tennis
Click For Summary

Discussion Overview

The discussion revolves around the mathematical modeling of a tennis ball's trajectory in a 3D game environment, specifically focusing on how to calculate the necessary angle and velocity for the ball to pass through three specified points: the starting position, a height over the net, and the target position on the ground. The context is primarily theoretical and applied, with a focus on physics principles without air resistance.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Experimental/applied

Main Points Raised

  • Mark seeks a method to determine the angle and velocity needed for a tennis ball to pass through three specific points in a 3D space, emphasizing that the model does not account for air resistance.
  • One participant suggests simplifying the problem to two dimensions by focusing on the plane of the ball's trajectory, indicating that the initial velocity can be chosen arbitrarily for the forward motion.
  • Another participant outlines the equations of motion for both horizontal and vertical components, proposing that the vertical motion can be described by a parabolic equation, with the final height being zero when the ball hits the ground.
  • A formula for height and range is provided, relating the initial velocity and angle to the gravitational constant, although it is unclear how these relate to the specific points Mark mentioned.

Areas of Agreement / Disagreement

Participants present various approaches and equations, but there is no consensus on a single method or solution to the problem. The discussion remains open with multiple viewpoints on how to model the trajectory effectively.

Contextual Notes

The discussion does not resolve the assumptions regarding the choice of initial velocity or the specific integration of the equations presented. There are also limitations in the clarity of how to combine the different components of motion to achieve the desired trajectory.

markofjohnson
Messages
2
Reaction score
0
Hi, I'm writting a 3D tennis game, and I need to revamp how the computer player hits the ball. I have a simple physics model for trajectory (no air resistance) that works great, but now I need to have the computer player play smarter, and make judgements about how to get the ball over the net optimally and to the target on the other side of the court.

This is a problem of solving linear equations for parabolic motion? (Again, there is no air drag in this game). Specifically what I need is what is the angle and velocity to hit the ball so that the ball goes through 3 points:

- Start position when hit is x1,y1,z1.
- The ball must be hit to x3,y3,z3 (z3=0 when hit ground).
- The ball must also get over the net at height z2 ie position x2,y2,z2.

What equations or code will tell me speed and velocity for hitting the ball through these 3 points?

Many thanks
Mark
 
Last edited by a moderator:
Physics news on Phys.org
what language are you writing this in?
 
Its for iPhone, so C, but I can translate from anything if you have some handy source code. Thanks.
 
Motion occurs in three dimensions but we can simplify it to 2 dimensions by considering only the plane containing the vector we want to hit the ball in (so the 2 dimensions of the plane are up and forward).

I assume your physics model neglects drag forces so, in the forward direction, the ball is given an initial velocity via. an impulse force and then no further acceleration occurs. So, motion in the forward dimension is simply

x = v0*t + x0

or equivalently,
d = rt

Note that, hitting the ball amounts to choosing initial velocity. For this dimension we can pick an arbitrary velocity. Then we solve for t (time) to see how long it will take to cover the distance from one side of the court to the other.

The second step is to consider the vertical motion of a parabola with that previous time value in mind, such that the final height will be 0 at the given time t, indicating that the motion has completed it's arc.

From the equations of motion with constant acceleration,
http://en.wikipedia.org/wiki/Equation_of_motion

What variables do we know? We know the final time, final position, and final acceleration but not the final velocity so we choose this equation:

x = x0+ v0*t + 1/2*a*t^2

x0 = initial height
x = final height ( = 0, since it hits table)
v0 = unknown
t = known, from first part
a = known, gravity

So you can just solve for v0.

Now you can combine the initial velocity that you chose randomly from step 1 with this one and that gives you the initial velocity vector (speed is just the length of the velocity vector)
 
height=(v^2(sin(x))^2))/(2g)
range=(v^2*sin(2x))/g
v=speed
g=9.8ms^-2
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 45 ·
2
Replies
45
Views
5K
  • · Replies 6 ·
Replies
6
Views
10K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
5K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K