Calculate the height (z-coordinate) of a point on a flat quadrilateral plane I'm not sure how to calculate the height of a point on a plane.
Plane {ABCD}, shown from above, with point E within the plane:
  :          :
··A----------B··
  |          |
  |       E  |
  |          |
  |          |
··D----------C··
  :          :
 A: location (0,0), height 1
B: location (10,0), height 3
C: location (10,10), height 5
D: location (0,10), height 3
E: location (8,4), height ??

If E were at (5,5), then I'd just average the heights of {A,B,C,D} to obtain the height at E. 
How do I calculate the height at a given point on plane {A,B,C,D), given the height of each of those points?
I've looked at taking weighted averages—I could, say, calculate the weighted height: along AB, (0.2 × 0) + (0.8 × 3) = 2.4; along DC, (0.2 × 3) + (0.8 × 5) = 4.6; along AD, (0.6 × 0) + (0.4 × 3) = 1.2; along BC, (0.6 × 3) + (0.4 × 5) = 3.8. But the issue is that I don't really know what to do with these four. A simple average of them won't work. In this example, the average is 3, which seems reasonable at an estimate. But the average would be 1.9166666 at (0.33333, 0) – and my thinking is that the height at this location should be 1.
EDIT: Alrighty, thank you all, especially @amd. This is what I came up with, based on amd's post:
$$ let: Q_a = {D_y-E_y\over D_y-A_y}A_z + {E_y-A_y\over D_y-A_y}D_z $$
$$ Q_a = {10-4\over 10-0}1 + {4-0\over 10-0}3 = {9\over 5} $$
$$ let: Q_b = {C_y-E_y\over C_y-B_y}B_z + {E_y-B_y\over C_y-B_y}C_z $$
$$ Q_b = {10-4\over 10-0}3 + {4-0\over 10-0}5 = {19\over 5} $$
$$ E_z = {B_x-E_x\over B_x-A_x}Q_a + {E_x-A_x\over B_x-A_x}Q_b $$
$$ E_z = {10-8\over 10-0}·{9\over 5} + {8-0\over 10-0}·{19\over 5} = {17\over 5} $$
A: In two dimensions, you can find the height of a point on a line segment by computing a weighted average, a.k.a. linear interpolation: If the endpoints of the segment are $P_1=(x_1,y_1)$ and $P_2=(x_2,y_2)$, then the $y$-coordinate of the point on the segment at $x_0$ is $${x_2-x_0\over x_2-x_1}y_1+{x_0-x_1\over x_2-x_1}y_2.$$ A way to derive this expression is to substitute $x_0$ into the equation $$y={y_2-y_1\over x_2-x_1}(x-x_1)$$ of the line through $P_1$ and $P_2$ and then rearrange.  
You can perform a similar interpolation in three dimensions over your rectangle: if you know the heights of the endpoints of either the horizontal or vertical line segment that passes through point $E$, then you can perform the above one-dimensional interpolation on that segment. To find the heights of the endpoints of, say, the horizontal segment, you just need to perform this same one-dimensional interpolation on the two vertical sides of the rectangle. To illustrate, the left end of this horizontal is at $(0,4)$, and interpolating along the vertical dimension produces $${10-4\over10-0}\cdot1+{4-0\over10-0}\cdot3 = \frac95.$$ Similarly, the right end is at $(10,4)$ with height $\frac{19}5$, and interpolating these in the $x$ direction, $${10-8\over10-0}\cdot\frac95+{8-0\over10-0}\cdot\frac{19}5 = \frac{17}5.$$ It might be a useful exercise to redo this calculation, but interpolating first in the $x$ direction instead.  
You could also compute a weighted average of the vertices directly using the barycentric coordinates of $E$ relative to this rectangle, but that’s at least as much work, I think.
A: A plane is defined from three points ABC using the following algorithm. How you handle the 4th point is up to you.


*

*Plane normal direction $$\vec{n} = (B-A) \times (C-B)$$
$$
\vec{n} = (B_x-A_x,B_y-A_y,B_z-A_z)\times(C_x-B_x,C_y-B_y,C_z-B_z)
$$
you can read more about the cross product of two vectors, but the generic answer from above would be:
$$
\vec{n} = [(B_y-A_y)(C_z-B_z)-(c_y-B_y)(B_z-A_z)]\mathbf{\hat{x}} \\ -[(B_x-A_x)(C_z-B_z)-(C_x-B_x)(B_z-A_z)]\mathbf{\hat{y}} \\ -
[(B_x-A_x)(C_y-B_y)-(C_x-B_x)(B_y-A_y)]\mathbf{\hat{z}}
$$


*Scalar Component $$d=-\vec{n} \cdot A$$
$$
d = n_xA_x+n_yA_y+n_zA_z
$$
You can read more about the dot product here


*Equation of plane $$ \mathbf{n}_x \hat{x}+\mathbf{n}_y \hat{y}+\mathbf{n}_z \hat{z} = d $$
Using your points, you can get the following:
$$\vec{n} = (10,0,2) \times (0,10,2)$$
getting a final equation for the plane to be:
$$
-20\hat{x}-20\hat{y}+100\hat{z} = 100 
$$
or 
$$
-\hat{x}-\hat{y}+5\hat{z} = 5 
$$
NOTE: You can see how your point D actually fits within this equation.
Now you can find the $\mathbf{z}$ coordinate of your point $E$ by doing:
$$
-8-4+5\hat{z} = 5 
$$
thus getting a $\mathbf{z}$ coordinate of $\frac{17}{5}$. Hence your final $E$ coordinates should be: $(8,4,\frac{17}{5})$
A: I think what you want is the bilinear interpolation that produces a hyperbolic paraboloid as $E$ varies.
In order not to post a link only example I've pasted in this from wikipedia. You can substitute the coordinates for $A,B,C,D$.
e) Hyperbolic paraboloid:
If the two directrices    are the lines
$$   c(u)=(1-u)  a_{1}+u a_{2},\quad   d(v)=(1-u)b_{1}+v b_{2} $$
one gets
$$
     x ( u , v ) = ( 1 − v ) ( ( 1 − u ) a_1 + u a_2 )   +   v ( ( 1 − u ) b_1 + u b_2 ) 
     $$ 
which is the hyperbolic paraboloid that interpolates the 4 points
$a_1 , a_2 , b_1 , b_2$    bilinearly.
Edit to work the OP's example.
This is much easier than the general case above since $ABCD$ is a very nicely situated square in the $xy$-plane.
To find the height above $E$ we first have to find $u$ and $v$, which tell us where $E$ lives relative to the corners along the $x$ and $y$ axes.
Since the $x$-coordinate of $E$ is $8$ and the side of the square is $10$ the point $E$ is $u= 0.8$ of the way from $A$ to $B$ (or, equivalently, from $D$ to $C$). Similarly, $v = 0.4$. (The sketch in the question is pretty accurate.)
Now $u$ and $v$ tell us how to average the heights at the corners using the second equation from wikipedia. The four values $a_1, a_2, b_1, b_2$ in that equation are the heights of $A, B, C, D$. Then the left side of that equation will be the height of $E$.
Warning: I haven't checked the order in which you match $a_1, a_2, b_1, b_2$ to $A, B, C, D$. You can figure it out by making sure you get the right answers when you substitute $0$ and $1$ for $u$ and $v$ since those will be the heights of the corners.
To make a final check, draw a picture with all four points in space and make sure it looks right.
