Perpendicular vectors
Given a vector which starts at the origin and points in a direction, how can I get vectors in each direction that are perpendicular?
For instance, if I had a vector v(0,0,1) pointing down the z-axis, how could I derive the vectors so that once would point strait up, down left and right?
I dont know if I''m being clear, so just say so if I''m not making sence.
The cross product of two vectors are always perpendicular, so cross your original by suitable other vectors. Google can probably help you if you need the cross product formula.
[size="1"][[size="1"]TriangularPixels.com[size="1"]] [[size="1"]Rescue Squad[size="1"]] [[size="1"]Snowman Village[size="1"]] [[size="1"]Growth Spurt[size="1"]]
Two vectors are perpindicular if their dot product is 0. So a vector v=(x,y,z) is perpindicular to a vector w=(a,b,c) if x*a + y*b + c*z = 0. Of course, given only 1 vector to test against, there are infinitely meny solutions.
Okay, that''s one vector, I assume the direction of the camera or something. You need to know another vector. For example, you need to know which way is up. Then to find the third, you just use a cross product. Also, if you know one vector, the vector in the opposite dirction is just the nagative of all the components.
tj963
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement