Ballistic arcs should not be elliptical - they must be parabolic.
Here's some projectile code I've made based on A-level formulae:
sync on
sync rate 30
autocam off
position camera 0,0,-100
make object sphere 1,10
wait 1000
Do
`altitude = 45° , azimuth = 15° , velocity = 30m/s , g = 9.8 m/s²
position object 1,ProjectX(30,45,15,time#),ProjectY(30,45,9.8,time#),ProjectZ(30,45,15,time#)
time# = time# + 0.05
sync
Loop
function projectH(v as float, theta as float, time as float)
h as float
h=(v*time)*COS(theta)
endfunction h
function projectY(v as float, theta as float, g as float, time as float)
y as float
y=((v*time)*SIN(theta))-((g*time*time)/2.0)
endfunction y
`projectiles in 3 dimensions: theta = altitude, phi = azimuth
function projectX(v as float, theta as float, phi as float, time as float)
x as float
h as float
h=ProjectH(v,theta,time)
x = h*SIN(phi)
endfunction x
function projectZ(v as float, theta as float, phi as float, time as float)
z as float
h as float
h=ProjectH(v,theta,time)
z = h*COS(phi)
endfunction z
`projectile maximums
function projectD(v as float, theta as float, g as float)
`maximum distance
d as float
d = (2.0*v*v*COS(theta)*SIN(theta))/g
endfunction d
function projectM(v as float, theta as float, g as float)
`maximum height
m as float
m = (v*v*SIN(theta)*SIN(theta))/(2.0*g)
endfunction m
function projectT(v as float, theta as float, g as float)
t as float
t = 2.0*v*SIN(theta)/g
endfunction t
The optomist's right, The pessimist's right.