-1
$\begingroup$

Given any Angle -> 0-90
Given any Initial Velocity -> 1-100
Given Acceleration due to Gravity -> 9.8
Plot every x,y coordinate (the parabolic trajectory) with cartesian coordinates and screen pixels (not time)

This should only be one equation as far as I can tell, a "y=" type equation, telling you the height in y coordinates based on the current x coordinate which is increasing by 1 as you plot across a computer screen.

I've come up with an equation that works for the angle 45, but doesn't seem to be entirely accurate for any other angle, I suspect it has something to do with the angle 45 having 1 solution and every other angle having 2 solutions (two different initial velocities land on the same spot), but I'm stumped beyond that.

Here is the inaccurate equation:
it won't let me attach images

$\endgroup$

2 Answers 2

2
$\begingroup$

Starting as Pieter Geerkens, the equations of motion in 2-D a parabolic system:

$ x(t) = x_0 + v_x t = x_0 + v_0 \cos(\alpha) t $

and int the $y$ axis:

$ y(t) = y_0 + v_0\sin(\alpha)t + \frac{1}{2}g t^2 $

where $g \sim -9.8$ is the gravitational acceleration.

Solvinf for t in the first equation as Pieter did:

$ t(x) = \frac{x - x_0}{ v_0 \cos(\alpha)} $

and then substituitint $t(x)$ in $y(t)$:

$ y(x) = y(t(x)) = y_0 + v_0\sin(\alpha) \cdot \frac{x - x_0}{ v_0 \cos(\alpha)} + \frac{1}{2}g \left(\frac{x - x_0}{ v_0 \cos(\alpha)}\right)^2 $

Then if your math is not good enoguh to do this algebraic manipulations you should study some of math to keep going. It's worth it.

$\endgroup$
1
$\begingroup$

First consider parametric equations for $x$ and $y$ as a function of $t$.

Now, for each $x$-value solve for $t = (x-x_0) / (v_0 \cdot \cos(\theta\,))$.

Then solve for the corresponding $y = y_0 + v_0 \cdot \sin(\theta\,) \cdot t - 4.9 \cdot t ^ 2$.

$\endgroup$
7
  • $\begingroup$ Thanks for replying but time is not helpful for my case which is why I'm trying to avoid using time as I can't quantify it. I can quantify x,y coordinates on a screen though. Given acceleration, initial position, angle, and initial velocity, is all of the information that should be needed to solve for every x,y coordinate on the projectiles path in a single equation, everything else is an imperfect solution $\endgroup$
    – Luke Allen
    Apr 12, 2013 at 7:20
  • $\begingroup$ Frankly, you are demonstrating a fundamental misunderstanding of the mathematics involved. The decision to solve the problem in parametric form is simply: BECAUSE IT IS EASIER THAT WAY. You asked for means of calculating (x,y), and the mechanism above supplies that. $\endgroup$ Apr 12, 2013 at 7:24
  • $\begingroup$ Maybe, I'm not that great at math. I just thought I knew enough that there should only be one "y=" cartesian equation to solve for all x,y coordinates on the projectile trajectory given those variables without the need for the variable "time." I don't know what comes easier to you, but if you read the original post I request a single equation that doesn't use time, if this is actually impossible, then I'd be glad to edit the post and humbly apologize, but it seems more elegant and simple to solve in a single equation if it's possible, as my end goal is programming. $\endgroup$
    – Luke Allen
    Apr 12, 2013 at 7:36
  • $\begingroup$ Someone smarter will have to verify but I think the answer is: y=(-(1/2))(g)x^2/(v0*cos(theta))^2+(v0*sin(theta))x/(v0*cos(theta)) $\endgroup$
    – Luke Allen
    Apr 12, 2013 at 7:52
  • $\begingroup$ The answer I mentioned above is working perfectly, why would you think it's not quite correct? $\endgroup$
    – Luke Allen
    Apr 12, 2013 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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