$g$: the gravitational acceleration—usually taken to be $9.81\:\mathrm{m/s^2}$ near the Earth's surface
$θ$: the angle at which the projectile is launched
$v$: the speed at which the projectile is launched
$y_0$: the initial height of the projectile
$d$: the total horizontal distance travelled by the projectile
The height $y$ of the projectile at distance $x$ is given by
However I'm writing a 3D game engine and would like to find out how to make that equation work in a three dimensional space $x,y,z$.
Answer
Three dimensions are no different than two. If $y$ is the vertical direction and you have worked out the equations for $y$ and $x$, you can apply the same equations with $z$ substituted in for $x$.
This is because physics is isotropic - the same in all directions. Gravity breaks the isotropy for the vertical dimension, but there is no physical difference between $x$ and $z$ so they are interchangeable.
This is not perfectly true on Earth because the rotation axis of Earth breaks the symmetry between $x$ and $z$, so there are Coriolis forces that are different in the $x$ and $z$ directions, but these are minor for everyday circumstances.
No comments:
Post a Comment