I\'m trying to find the trajectory an object would take (assuming air drag is negligible and trajectory angle is always between 0 and 90), including peak height. Here\'s wh
I assume cannon ball like trajectory
So
solve the equations to find missing data
g=9.81; // [m/s^2]
t=!; // [s] time in air
p0(x0,y0)=!; // [m] start point
p1(x1,y1)=!; // [m] end point
v0(vx0,vy0)=?; // [m/s] start velocity vector
// Y axis free fall with initial velocity
y1=y0+vy0*t-0.5*g*t*t
vy0=(y1-y0+0.5*g*t*t)/t
vy0=(y1-y0)/t+0.5*g*t
// X axis constant speed
vx0=(x1-x0)/t
trajectory path point
x=x0+vx0*t;
y=y0+vy0*t-0.5*g*t*t;
where t = <0.0,time_in_air>
so for plotting do some for
loop through t
peak point:
vy(t)=vy0-g*t;
// for peak the y velocity is zero so
0.0=vy0-g*t;
t=vy0/g;
where t
is the time when object reach peak point. If you need coordinates then compute them like in bullet #2