Jump to content
• ### What is your GameDev Story?

• Advertisement

# Find perpendicular ray to a plane in point normal form?

This topic is 3242 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

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.

#### Share this post

##### Share on other sites
Advertisement
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

##### Share on other sites
Yeah, that makes sense. Thanks for the help.

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement
• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• ### Popular Now

• 27
• 16
• 10
• 10
• 11
• Advertisement
• ### Forum Statistics

• Total Topics
634101
• Total Posts
3015528
×

## Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!