• Create Account

## Finding a unit vector orthogonal to another vector, on a 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.

2 replies to this topic

### #1pondwater  Members

191
Like
0Likes
Like

Posted 12 June 2013 - 10:46 PM

I have a vector A, and I have a plane P consisting of a point (Pp) and normal (Pn)

I need to find the vector B, that is orthogonal to A and also on P.  To prevent infinite solutions, lets make B unit length.

If V is perpendicular to P there are infinite, we can ignore this case, as in my application it will never occur.

As far as I can see in every other case there will be two vectors.

We have 3 unknowns and therefore need three equations:

1) A and B are orthogonal, therefore their dot product is zero

(A.x * B.x) + (A.y * B.y) + (A.z * B.z) = 0

2) If B is in the plane P, then there are orthogonal and the dot product between B and Pn is zero

(B.x * Pn.x) + (B.y * Pn.y) + (B.z * Pn.z) = 0

3) B will be unit length

sqrt(B.x^2 + B.y^2 + B.z^2) = 1

Now I assume I could plug these into a fancy equation solver and find vector B (and its negation), butI was hoping there is a more specific / optimized approach.

Any ideas?

### #2apatriarca  Members

2307
Like
1Likes
Like

Posted 13 June 2013 - 01:44 AM

You can simply do a cross product of the vector A with the plane normal and then normalize/negate as required.

Edited by apatriarca, 13 June 2013 - 01:53 AM.

### #3pondwater  Members

191
Like
0Likes
Like

Posted 13 June 2013 - 08:40 PM

Well this is embarrassing, lol. I guess I was really over thinking it.

That works perfectly, thank you very much!

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.