View Full Version : Y value of a point on a quad
evenmybird
2006.08.06, 06:03 PM
I am having trouble figuring the height of a point on any given quad. Is there some way of calculating this using the coordinates of the 4 corners?
I have the 4 coordinates of the corners, and the x and z values of the point on the quad..I want to find the y value of that point.
The quad is in 3d space, and is planar.
I think I'm having trouble posting, not sure but my replies arent showing up.
OneSadCookie
2006.08.06, 06:07 PM
Yes.
How many dimensions are we working in? (It's a bit easier in 2D than 3D). If in 3D, are we guaranteed that the quad is actually planar, and that the point is in the same plane?
unknown
2006.08.06, 06:15 PM
what information are you starting with and what do you want to end up with?
evenmybird
2006.08.06, 06:19 PM
The quad is in 3 dimensions.
It is planar.
I have the 4 corners of the quad, and the x and z values of some point on that quad..what I want is the y value of that point on the quad.
OneSadCookie
2006.08.06, 06:28 PM
if the vertices of the quad are A, B, C, D then (A-B) x (D-B) gives you the quad's plane's normal, and a vertical line through the point is (X,0,Z) + k(0,1,0). Then you can do a standard line-plane intersection.
OneSadCookie
2006.08.06, 06:32 PM
More simply than the plane/line thing, just plug x & z straight into the plane equation, and solve for y (which is the only remaining unknown).
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.