Triangulation - Finding Elevation on a 3D surface

Find Point On a 3D Surface

To calculate a point on a 3D plane, assume that there are 3 non-collinear points Pa, Pb and Pc.
Let Pa=[xa,ya,za], Pb=[xb,yb,zb], Pc=[xc,yc,zc].

The general equation of the plane is of the form
Ax+By+Cz+D=0 ………………… (1)

Consider the figure shown below to calculate the coefficients of the above equation A, B and C

 3Dsurface1.png

Note: X refers to cross product

. refers to dot product
* refers to multiplication

The normal to a plane is of the form
N = (Pac X Pab)/(|Pac X Pab|)
N = (Pc-Pa) X (Pb-Pa)/(| (Pc-Pa) X (Pb-Pa)|)

We find that the resulting direction vectors of the normal from the three points Pa, Pb, Pc are
N = [A,B,C] (The coefficients of the equation of the plane in Equation (1))

Now consider an arbitrary point P=[x,y,z] as shown below

3Dsurface2.png

It is found that the plane equation satisfies the following property

(P-Pa).N=0

=>A(x-xa)+B(y-ya)+C(z-za)=0
=>Ax+By+Cz+D=0 (where D=-[Axa+Bya+Cza])
=>x=-(1/A).[By+Cz+D]
=>y=-(1/B).[Cz+Ax+D]
=>z=-(1/C).[Ax+By+D]
Thus depending on whether x, y or z is unknown the equation of the plane can be found.

To understand this consider the example where Pa=[1,2,1], Pb=[1,0,2], Pc=[2,2,1] and P=[4,5,z] where z has to found as shown below

3Dsurface3.png

To find z follow the below mentioned steps

Step1: Find the coefficient terms A, B, C, D
Pac=Pc-Pa=(2-1,2-2,1-1)=(1,0,0)
Pab=Pb-Pa=(1-1,0-2,2-1)=(0,-2,1)

The normal to a plane is of the form
N = (Pac X Pab)/(|Pac X Pab|)
N = (Pc-Pa) X (Pb-Pa)/(|(Pc-Pa) X (Pb-Pa)|)

Pac = (Pc-Pa) = [2,2,1] - [1,2,1] = [1,0,0]
Pab = (Pb-Pa) = [1,0,2] - [1,2,1] = [0,-2,1]

(Pac X Pab)= i j k

1 0 0

0 –2 1

= i(0) - j(1) + k(-2)

(|(Pc-Pa) X (Pb-Pa)|)= ?[(0)2 + (1)2+ (2)2]
=√[1+4]
=√5

Substituting in N = (Pc-Pa) X (Pb-Pa)/(|(Pc-Pa) X (Pb-Pa)|)
N=[0 –1 –2]/√5
Therefore A=0 , B=-1/√5 , C=–2/√5

Step2: Find D
D=-[Axa+Bya+Cza]
D=-[0*1 + (-1/√5)*2 + (–2/√5)*1]
=-[0-2/√5-2/√5]
=4/√5

Step3: Find z by substituting the value of x=4 and y=5 in point P
z=-(1/C).[Ax+By+D]
z=-(1/–2/√5).[0*x+(-1/√5*y)+4/√5]
z=(√5/2)*[0+(-1/√5)*5+4/√5]
z=(√5/2)*[0+(-5/√5)+ 4/√5]
z=(√5/2)*[-1/√5]
z=-1/2