kalaiselvam.p@[EMAIL PROTECTED]
wrote:
> I am developing a 3D car game in C++ using openGL. To calculate the
> Ground Velocity, I need the formula to calculate tangent for 3D
> vector. I got the tangent for 2D vector from some game samples (i.e.,
> Tangent for 2D vector (x,y) = (-y,x)). Please help me to find out the
> tangent for 3D vector.
What you're describing is a vector perpendicular to the first vector,
not a tangent of any kind.
In two dimensions, there are an infinite number of vectors orthogonal to
a particular vector, and they're all scalar multiples of each other.
Such a vector is indeed given by your example of k (-y, x).
In three dimensions, there are also an infinite number of vectors
orthogonal to a particular vector, but they're not scalar multiples of
each other. In fact there are an infinite number of directions in which
such a vector can point, so you're going to have to be specific about
which one you want.
--
Erik Max Francis && max@[EMAIL PROTECTED]
&& http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
The multitude of books is making us ignorant.
-- Voltaire


|