# Soccer goal. Need help defining height of ball at a distance.

## 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.

Related Introductory Physics Homework Help News on Phys.org
I found this formula defining height.

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

What does the A-hat represent?

Redbelly98
Staff Emeritus
Homework Helper

## 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?

Redbelly98
Staff Emeritus
Homework Helper
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.