Jump to content
  • Advertisement

Archived

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

L-Tryosine

3DPoints on same plane

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

Advertisement
The plane''s equation is: A x + B y + C z + D = 0

Vector (A,B,C) is the plane''s geometric normal and can be easily computed using a cross-vector multiplication with 3 points and then solve for D. Introducing the fourth point in the equation above will equate to zero (0) if it is to lie on the plane. I leave it to you to fix the tolerance needed for this to be true.

Share this post


Link to post
Share on other sites
quote:
Original post by Tybalt
3 points will always lie in a plane, won''t they?
Not sure what you mean.


Of course, no! They can form a line

Share this post


Link to post
Share on other sites
I wrote:
"I leave it to you to fix the
tolerance needed for this to
be true."

Of course, there are several ways the equation will break down leading to more complex algorithmics:

a) all points are equal
b) points are co-linear
c) floating-point imprecisions
c1) points are too far away from the origin
c2) points are almost co-linear
c3) points are almost equal (too close)
d) bad selection of 3 out of 3+N points
leads to scenarios above.

Regardless of the scenario, you will have to find the set of reasonnable assumptions that will make your code work at optimum speed. I can''t make that decision for you.


Share this post


Link to post
Share on other sites
3 points will always lie on a plane, since three points are needed to actually create and define a plane. The line situation is a special case: they still lie on a same plane, but they don't define a specific one.

Edit: unless you mean to check if some arbitrary point lies on another, arbitary plane, independently defined by it's normal and D offset. In that case, you can use the plane equation, as cbenoi1 mentioned.

[edited by - Yann L on February 7, 2003 10:28:10 AM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!