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

This topic is 5020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
Maybe it's -D and not +D in all your expressions?
I imagine your plane equation is Ax+By+Cz+D=0.

##### 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 on other sites
Alright - thanks, guys. I'll look into it ASAP.

1. 1
Rutin
26
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633312
• Total Posts
3011308
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

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!