Y value of a point on a quad

evenmybird
Unregistered
 
Post: #1
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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?
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
what information are you starting with and what do you want to end up with?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
evenmybird
Unregistered
 
Post: #4
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
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).
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  quick opengl 2d quad question dave05 2 3,703 Jun 9, 2005 06:09 PM
Last Post: arekkusu
  Quad Vertex Array Woes WakingJohn 1 2,425 Apr 9, 2005 07:55 PM
Last Post: WakingJohn
  Turn a Quad into particles MACnus 10 6,867 Feb 6, 2005 09:10 AM
Last Post: Duane
  Quad Collision-Detection Duane 5 5,404 Jan 18, 2005 01:42 PM
Last Post: Duane
  Alpha value on textured quad monteboyd 5 4,371 Jun 29, 2002 04:36 AM
Last Post: inio