The ship's orientation is represented by two angles, which I call "tilt" and "swivel". Extracting a cartesian vector from these 3D spherical coordinates (i.e. a radius and two angles) is as follows:
x = cos(swivel) * sin(tilt)
y = sin(swivel) * sin(tilt)
z = cos(tilt)
Then, the radius r is simply the magnitude of the vector; that is, how fast the object is going.
No comments:
Post a Comment