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} $$