Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

drstrangeluv

Finding Orthogonal Vectors

This topic is 6879 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A vector has an infinite number of orthogonal vectors. Do you want any one of these vectors or are there further requirements not mentioned in the original post?

Share this post


Link to post
Share on other sites
Advertisement
How do you generate an orthogonal vector in 3D given you only know one vector (i.e. I know the direction the object is moving, but I want to generate a vector that's perpendicular to that vector). If convoluted math is involved, give it to me straight, I can take it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
For example

v1 (DOT) v2 = 0 gives orthogonal vectors

so you get

v1 = (a, b, c)
v2 = (x, y, z)

so ax + by + cz = 0.

This can be trivially solved by setting
any of

x=y=1 and so z = -(a+b)/c (if c != 0)
x=z=1 so y = -(a+c)/b (if b!=0)
y=z=1 so x = -(b+c)/a (if a!=0)

Once you've done this once,
the third vector can be generated by taking the cross of the two vectors, defined by

(bz-cy, cx-az, ay-bx) = (a1, b1, c1)


Anyway,
HTH.

signing off,
mikey

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!