0
$\begingroup$

I'm working on a volleyball game but my maths/physics knowledge isn't quite up to par. I need some help with the following problem:

The player can hit the ball from anywhere on the left of the court into one point on the right:

    P    |    x  

The ball travels in a parabola defined by the three points, all of which are known:

  • The players X coord and height (Xp, Yp)
  • The point just above the top of the net (0, Yn) (assume the left of the court is negative along the x axis)
  • The point where the ball impacts the ground on the other side of the net (Xi, 0)

I need to calculate the initial X/Y velocities (or magnitude/angle) when the player hits the ball so that the ball, affected only by gravity, follows that parabola. Alternatively, the flight time from which the X/Y component velocities can be calculated.

Essentially, what I have is:

  • The ball's trajectory (as a parabolic function)
  • Acceleration due to gravity

What I need is either:

  • Initial compound velocities or magnitude/angle
  • Possibly just the flight time? If I divide the distance traveled by the number of airborne frames I can find the Y for any X and just draw the ball where it needs to be.

Any help?

EDIT: Simplified the description to remove confusion

EDIT: Ok, at the moment I've got a formula for a parabola that goes through all the points I need it to, and I can watch the ball fly through the air by incrementing/decrementing it's X coordinate by a discrete value over a discrete time (say, 60 pixels per second (1px per frame as 60 fps) apologies for the game language). But having a constant horizontal velocity for all trajectories is wrong - I need a constant vertical acceleration (i.e. gravity) for all trajectories and variable horizontal velocity depending on how long/short the range is. It seems like simple Newtonian physics from here so I'll figure it out soon enough.

$\endgroup$

closed as off-topic by John Rennie, Ali, yuggib, Norbert Schuch, ACuriousMind Jan 11 '16 at 14:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – John Rennie, Ali, yuggib, Norbert Schuch, ACuriousMind
If this question can be reworded to fit the rules in the help center, please edit the question.

1
$\begingroup$

This is a problem on motion of a projectile.Any elementary books(12+) explains flight time,maximum height,range in terms of initial velocity $v_0$,direction $\theta$ with $x$ axis and $g$.

Total flight time is $t=\frac{2v_0\sin \theta}{g}$ where initial and final heights are same.($y_f=y_i$)

Maximum height it reaches in that time interval is $h=\frac{v_0^2\sin^2\theta}{2g}$

Total distance covered along $x$ direction in that time $R=\frac{4h}{\tan \theta}$

In case the initial height and final heights are not same the time of flight will change.You can calculate it by setting equation of motion in $y$ and $x$.

Coming to the problem in hand $y_i=Y_p$ and $y_f=0$.So after the ball is hit with say velocity $v_0$ and angle $\theta$ it reaches maximum height in a time $$\Delta t_1=\frac{1}{2}\frac{2v_0\sin \theta}{g}$$ and it's vertical velocity at maximum height is $v_H=0$.So the time to travel the rest part that is from $y=y_{max}$ to $y=0$ is simply obtained from $H=\frac{1}{2}g\ (\Delta t_2)^2$ which is $$\Delta t_2=\sqrt{\frac{2H}{g}}$$.So total time $$\Delta t=\Delta t_1+\Delta t_2$$ Where if the maximum point is $(X_m,Y_m)$ then $H=Y_m-0=Y_m$.

Similarly $x_i=X_p$ and $x_f=X_i$ so $$X_i-X_p=\text{velocity along x axis }\times \Delta t=v_0\cos \theta \times \Delta t$$

EDIT: If there is no upward motion and initial velocity is in $x$ direction i.e $\theta=0$ then $v_y=0$ and the vertical motion along $y$ axis is just a free fall.It starts to fall under gravity with zero initial velocity along $y$ axis. But if $\theta\neq 0$ there there will a velocity component along $y$ axis $v_y=v_0\sin\theta$.

If $\theta< 0$ then there is no upward motion at all. But it starts with non zero initial velocity along $y$ axis and it is no longer free fall.$v_{y0}=v_0\sin\theta(-\hat{y})$. If the height difference between final and initial $y$ is say $H$ then time of flight is obtained by solving $$H=v_{0y}t+\frac{1}{2}gt^2$$

If $\theta>0$ then there is first upward motion.It starts to move upward reaches maximum height and from maximum height it free falls. Or it can be viewed like after reaching maximum height it falls downward and reaches the same height as initial and from there it follows a motion like the case where $\theta<0$ as you can show velocity there will be $v_0\sin\theta (-\hat{y})$

$\endgroup$
  • $\begingroup$ "In case the initial height and final heights are not same the time of flight will change.You can calculate it by setting equation of motion in y and x." Thanks for the answer. Could you please elaborate on this point please? Since the initial y could be quite different from the final y (in the case of a spike there would be no upward motion at all, for example) $\endgroup$ – NoeL Jan 11 '16 at 8:07
  • $\begingroup$ I have explained in the answer how to calculate it following that sentence. $\endgroup$ – Prof Shonku Jan 11 '16 at 9:20
  • $\begingroup$ I'm not sure if I'm missing something, but just to be clear I don't have values for Vo and theta so I'm having trouble finding the flight time with the equations you've given me. I'll edit my initial question to update where I'm currently sitting. $\endgroup$ – NoeL Jan 11 '16 at 9:46
  • $\begingroup$ Let me assume you have total distance along $x$ axis say $X_f-X_i=R$.Let the total time of flight is $\Delta t$ then $R=v_{0x}\times \Delta t$. This equation along with equation for $H$ with known $H$ has two unknown variables $v_0$ and $\theta$. Solving two equations you will get required $v_0$ and $\theta$. Once you have found them use in the equation for $R$ to get $\Delta t$ $\endgroup$ – Prof Shonku Jan 11 '16 at 9:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.