Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Projectile Motion, Gravity, Parametrics

  1. Aug 24, 2008 #1
    Hi I am trying to make a computer program that calculates when an object hits the ground (on a 2d plane) given a certain angle (Degrees), speed (m/s), and an optional offset for x and or y. Is there a single equation i can use to solve this?

    Example Equation:


    What is T when Y=0 given the offset of y+8??

    The equation for solving without an offset i believe is:

  2. jcsd
  3. Aug 25, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Your equation for the y distance is wrong. There should be a sine n there. If you want to find t you will have to solve the quadratic equation of the y distance. The time you have given is one solution to the quadratic equation when c is zero.

  4. Aug 25, 2008 #3


    User Avatar
    Science Advisor

    As Kurdt said, one of those "cosines" should be "sine"; if the angle is the initial angle with the horizontal then the Y(t) term should involve sin(30) which is 1/2. cos(30)= sqrt(3)/2.

    When Y= 0, 0= 8+ (20sin(30)T- 4.9T^2 which is the same as the quadratic equation
    4.9T^2- 20sin(30)T- 8= 0. You can use the quadratic formula to solve that:
    [tex]T= \frac{20sin(30)\pm\sqrt{(20sin(30))^2+ 4(4.9)(8)}}{2(4.9)}[/tex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook