Vectors

Started by
2 comments, last by ECKILLER 23 years, 10 months ago
Hi, How do you calculate the direction of a vector in 3 dimensions? ECKILLER
ECKILLER
Advertisement

A 3D Vector is the direction and magnitude. You need to restate your question with more information on what you are trying to do.

Try this site for more information on vectors:

Vectors


"You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!""
Do you mean the angles/sphere coords?

Because
x = r*cos(u)*sin(v)
y = r*sin(u)*sin(v)
z = r*cos(v)

you get

r = sqrt(x^2 + y^2 + z^2)

u = arctan(y/x)

v = arctan(z/sqrt(x^2+y^2))

Visit our homepage: www.rarebyte.de.st

GA
Visit our homepage: www.rarebyte.de.stGA
Thanks ga, i thumbed through a calculus book to see the differant methods to describe its direction and yes spherical coords is the way i wanted.



ECKILLER
ECKILLER

This topic is closed to new replies.

Advertisement