Jump to content
  • Advertisement
Sign in to follow this  
Josh Klint

A plane problem

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

We have two known points, A and B, that lie on the plane.

Point C is known, and lies a known distance D in front of the plane.

What is the plane equation?

Share this post


Link to post
Share on other sites
Advertisement
Hidden
There are infinitely many, independant solutions to your problem.


it's easy to see this visually, if not consider:

choose 'any' unit vector 'n' for the plane normal, then the plane formed by the 3 points A, B, C - Dn is a solution to your problem.

Share this post


Link to post
I think it's unambiguous, but I might have left something out in my description. Ah, you just "got" it and deleted your response! :lol:

Share this post


Link to post
Share on other sites

I think it's unambiguous, but I might have left something out in my description. Ah, you just "got" it and deleted your response! :lol:


I don't think there is enough information there to get the plane normal; you've only got one vector on the plane and a distance which is known to be in the direction of the normal?

Cheers, Paul.

Share this post


Link to post
Share on other sites
wolfram alpha gives us a ... very long solution!

clearly the unit - normal of the plane you want is such that:

A dot n = B dot n = C dot n - D

or to have less variables:

(C-A) dot n = (C-B) dot n = D

in the wolfram alpha query, i have that (a,b,c) = C-A, and (A,B,C) = C-B, with (x,y,z) being our normal for the plane.
the result... is horrible (though there are many many common terms that could be extracted to shorten the solutions)


The 2 solutions

Share this post


Link to post
Share on other sites
I have to run to work so don't have the full derivation. However, assume a point E is the point in the plane that's distance D from C. I assume that your description of C means the vector E-C is perpendicular to the plane.

Form the plane normal N = Normalize( (E-A)cross(E-B) ). N will be in terms of unknowns E[sub]x[/sub], E[sub]y[/sub], E[sub]z[/sub].

E-C = D*N (i.e, length of E-C = D)

E[sub]x[/sub] - C[sub]x[/sub] = D*N[sub]x[/sub]
E[sub]y[/sub] - C[sub]y[/sub] = D*N[sub]y[/sub]
E[sub]z[/sub] - C[sub]z[/sub] = D*N[sub]z

[/sub]3 equations with 3 unknowns.

EDIT: Actually, you do have to specify that the points A and B, and the point in the plane nearest point C, are not colinear in the plane. Edited by Buckeye

Share this post


Link to post
Share on other sites
the wolfram alpha query can be made a bit more manageable by not enforcing a unit normal (can do that as a post-step anyways)
in which case you get the (still very long, but clearly simpler) solution sets:


2 Solution sets


the only potential issue is that you need to choose the z-coordinate for the normal, so in corner cases you might require z to be zero, and others non-zero to get a solution.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!