I'm a junior in high school and we're studying 2d projectile motion right now in physics. Like, for example, a ball being shot out of a cannon. If the initial speed and angle are known, one can calculate the height(Y) and distance(x) of the projectile from the origin. Anyway, I decided to write a program that, when given the initial speed and angle of the projectile, would move the projectile across the screen much like it would in real life. I tried making a timer, and then every hundreth of a second, the timer would do the math, figure out where the ball should be at that given time, and then put it there. This didn't work however. I would really appreciate it if someone could help. Here are the formulas:
Initial Speed = v angle = a time = t
X = (V * Cos(a)) * t
Y = ((V * Sin(a)) * t) - (4.9 * t * t)
Please help me if you can.
-Mike -Mike
Initial Speed = v angle = a time = t
X = (V * Cos(a)) * t
Y = ((V * Sin(a)) * t) - (4.9 * t * t)
Please help me if you can.
-Mike -Mike