0
$\begingroup$

I have the following:

  • 2d vector for velocity
  • 2d start coordinate
  • gravity acceleration

I need to know the coordinate of a projectile at a given distance along the trajectory.

For example:

  • Velocity = (5m/s,3m/s)
  • start coordinate = (10m,10m)
  • gravity = 10m/s/s
  • distance along trajectory from start = 1m

I'm doing this for a simulation where I need to draw a dotted line along a trajectory of a projectile.

  • 0
    I have, I might be missing it, but I couldn't find anywhere in there where it shows how to get the x and y position at a certain distance along the trajectory. The closest thing I found in there was the coordinate at a certain horizontal distance. I need the (x,y) at 1m along the trajectory. or 2m, 3m, etc.2011-10-19

1 Answers 1

1

Taking $y$ as the vertical, measured up, and $x$ as horizontal, we have $x(t)=x_0+v_x(0)t, y(t)=y_0+v_y(0)t-\frac{g}{2}t^2$

Added: the arclength element is $ds=\sqrt{dx^2+dy^2}$ so $\frac{ds}{dt}=\sqrt{(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}=\sqrt{v_x^2+(v_y(0)-gt)^2}$ It may be easier to integrate the differential equation, particularly if something may perturb the trajectory along the path.

  • 0
    that works for me. now time to put this into my sim2011-10-19