View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# orthogonal in plane

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

3 replies to this topic

### #1JohnnyCode  Members

Posted 23 October 2013 - 11:31 AM

Hi

I have two 3d vectors A and B. There exist 2  vectors orthogonal to vector A that lies in plane defined by A and B (plane that A and B lies in). How do I find those two vectors?

Thanks much!

 little keys typo

Edited by JohnnyCode, 23 October 2013 - 11:33 AM.

### #2Brother Bob  Moderators

Posted 23 October 2013 - 11:43 AM

The cross product between A and B gives you N, the normal of the plane spanned by A and B. The corss product between A and N gives you a vector that is perpendicular to A, and also perpendicular to the normal N and thus it has to be on the place.

Any scalar times the cross product of A and N also perpendicular to A and on the place spanned by A and B, so there is an infinite number of such vectors, not just two.

Edited by Brother Bob, 23 October 2013 - 11:43 AM.

### #3JohnnyCode  Members

Posted 23 October 2013 - 01:11 PM

Thanks. Awesome. I ment two directions, unit vectors, I will just pick the one that is <90deg to B vector by a simple dot product sign check.

Thanks

### #4Brother Bob  Moderators

Posted 23 October 2013 - 01:32 PM

Work out the correct order of the cross product arguments instead and you don't need to do that. Done the right way, you will always get the one closest to B.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.