Sign in to follow this  
thatguyfromthething

Find perpendicular ray to a plane in point normal form?

Recommended Posts

Quote:
I have a plane defined as a point and a direction vector from that point. I need to find any vector perpendicular to the plane's direction vector. I know the dot product has to be 0 between them, but I am not sure how to make sure that is the case.
Here's the method I'd recommend:

1. Identify the element of the plane normal with the least magnitude.

2. Take the cross product of the plane normal and the cardinal basis vector corresponding to this element.

3. Normalize the result.

As an example, say the plane normal is [-1, 2, -5]. (I'm using a non-unit-length normal here just for convenience.)

The magnitudes of the elements are 1, 2, and 5. The element with the least magnitude is the first element, x. Therefore, we cross the normal with the cardinal x axis, [1, 0, 0], and then normalize the result.

By crossing with the basis vector corresponding to the element with the least magnitude, we ensure that the result will be valid and that the normalization will be stable (that is, we won't be trying to normalize a vector with a small magnitude).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this