# Thread: Distance of a point from a triangular surface....

1. ## Distance of a point from a triangular surface....

Can someone help me finding a distance of a point (x1,y1,z1) from a triangular surface
where the distances from three corners to the point are known.
and three sides of the triange are known.

2. For a triangle ABC, with sides of length a,b,c respectively, you might be able to solve by letting A lie at the origin of the plane, and B lie in the x-axis. Then the distance of each corner from the point $p=(x_1,y_1,z_1)$ will represent the radii, $r_a$, $r_b$, and $r_c$, of three spheres with centres at A, B, and C respectively.

The intersection of all three spheres will be the point, p, which might be obtained from finding $p=(x_1,y_1,z_1)$, which satisfies the following three equations for spheres simultaneously:

$x^2+y^2+z^2=r_a^2$

$(x-c)^2+y^2+z^2=r_b^2$

$(x-c_x)^2+(y-c_y)^2+z^2=r_c^2$

You can calculate the point $C=(c_x,c_y,0)$, knowing that A is at the origin and also knowing the lengths a, b, and c.

The intersection of the first two spheres should give you the equation for a circle parrallel to the z-y plane. The x value that satisfies both this, and the equation of your third sphere will be your x ordinate.

Assuming the distance from the triangle to the point is not zero (the point does not lie in the plane) there should be two solutions - one for the point above the plane, and one for the point below. The modulus of either of these (z-ordinates) is the distance.

3. ## thanks!

thank you for the solution.