Finding ball height at a distance for soccer goal program

  • Thread starter Thread starter lorenzosounds
  • Start date Start date
  • Tags Tags
    Ball Height
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
lorenzosounds
Messages
4
Reaction score
0

Homework Statement



Write a program to determine whether or not a ball kicked is a goal. Initial distance (from goal), initial angle, and initial speed are user-defined variables. The net is 2.54 m high. Gravity is 9.81m/s^2


Homework Equations



flightTime=(2)initSpeed*sin(initAngle)/gravity

range=flightTime*initSpeed * cos(initAngle)


The Attempt at a Solution



Trying to define whether or not the ball is above the net when the ball is at the initial distance. I've been thinking about it in terms of trig functions, specifically Sin. Also, maybe using the pythagorean theorem (initDistance^2 + height of ball^2 = Length of tangent line between initDistance and ball^2).

I'm also aware of the kinematic equation vi^2 * (sinθi)^2/2g, which gives the max height of a parabolic flight. However, this doesn't let me define the height at any moment.
 
Physics news on Phys.org
I found this formula defining height.

y(t) = (Vo sinm)) - (gt²)/2

What does the A-hat represent?
 
lorenzosounds said:

Homework Statement



Write a program to determine whether or not a ball kicked is a goal. Initial distance (from goal), initial angle, and initial speed are user-defined variables. The net is 2.54 m high. Gravity is 9.81m/s^2


Homework Equations



flightTime=(2)initSpeed*sin(initAngle)/gravity

range=flightTime*initSpeed * cos(initAngle)


The Attempt at a Solution



Trying to define whether or not the ball is above the net when the ball is at the initial distance. I've been thinking about it in terms of trig functions, specifically Sin. Also, maybe using the pythagorean theorem (initDistance^2 + height of ball^2 = Length of tangent line between initDistance and ball^2).

I'm also aware of the kinematic equation vi^2 * (sinθi)^2/2g, which gives the max height of a parabolic flight. However, this doesn't let me define the height at any moment.
Welcome to Physics Forums.

"Relevant equations" should probably include all kinematic equations, applied to both horizontal and vertical motion.

You can use the kinematic equation that tells you the ball's height at any given time, given the acceleration and initial velocity.

Also, what is supposed to happen to the ball if it hits the ground before reaching the goal? Does it come to a complete stop, bounce off the ground, continue rolling along the ground, or something else?
 
lorenzosounds said:
I found this formula defining height.

y(t) = (Vo sinm)) - (gt²)/2

What does the A-hat represent?
That looks similar to the following equation (2nd equation listed under "Displacement"):
http://en.wikipedia.org/wiki/Projectile_motion#Displacement

But there is no A-hat in that equation.

I'll suggest that you look at a physics textbook, in the section that discusses projectile motion, which will have all the equations and also explain what all the terms mean.