• Advertisement
Sign in to follow this  

Calculating the 3D coordinates for an arbitrary point on a plane

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

This not homework - it's just me who's being dumb. Anyway, the best I can figure is that I need to project the 2D plane space coordinate components on the primary axis plane and then re-project them onto the plane in world space by changing the third component. How do I do the latter? I'm assuming that I'd need to use the plane equation, but what I've got isn't working so far: //plane space coordinates and plane components u, v A, B, C, D, normal //the primary axis plane retrieved from the plane's normal pap //project u and v onto the primary axis plane and obtain two new values (I'm pretty sure I'm doing everything up to this place correctly) pu, pv //project pu and pv back into world space using the plane equation if pap = YZ x = -(pu + pv + D)/ A y = pu z = pv if pap = XY x = pu y = pv z = -(pu + pv + D)/ C if pap = XZ x = pu y = -(pu + pv + D)/ B z = pv //get the vertex in world space final = (x, y, z) Needless to say, the above solution isn't working and I'm unsure why. Can anyone run their eyes over it and tell me if it's at all correct?

Share this post


Link to post
Share on other sites
Advertisement
Maybe it's -D and not +D in all your expressions?
I imagine your plane equation is Ax+By+Cz+D=0.

Share this post


Link to post
Share on other sites
the problem is youre using a sucky plane equation.

if you define your plane using two vectors that span it, all you have to do is:

worldcoord = uaxis * u + vaxis * v;

Share this post


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

  • Advertisement