# Computing the point which is closest to many Planar surfaces

Suppose, i have been given different planes which orients to different direction (i.e. i know only the plane parameter of those planes). If i am able to find out planes (probably more than 3 planes) which should intersect (or meet) at a certian point (this is the corner point where those planes make), then how can i find that point. this point would be the one which is closest to all those seleted planes. if any one can explain the way to go further then it is gratefull as i have to use least square to get a more accurate values.i found the CramersRule's but i am not sure whether it fit for this problem and i am not sure how to implement it as i am poor in this geometric and matrices things. thank you in advance.

-
I think it might be best to dualize your problem to finding a plane that is close to many points, for the latter ("best-fit plane") is well-studied. – Joseph O'Rourke Dec 2 '11 at 13:12
@Joseph O'Rourke: thanks for the comments. but i am not looking for the best fit plane. I already got the best fit planes and now i want to intersect those fitted planes as i want to know the coordinate of that types of corner points. – niro Dec 2 '11 at 13:18
What I meant is to dualize your many planes to many points, and then dualize the point which you seek to an unknown plane that fits those many dualized points. I know I am being cryptic; sorry. – Joseph O'Rourke Dec 2 '11 at 13:24
@Joseph O'Rourke: that could be a good option. i am not sure how would it be sir... – niro Dec 3 '11 at 9:45
What does "closest to all the planes" means ? do you want to minimize the max distance, or the sum of distances, or.... – Suresh Venkat Dec 21 '11 at 0:33

I just realized that since you're working with sum of squares, there might be an easy answer. Suppose your plane $h$ is $\sum a_i x_i +a_0 = 0$. Then the distance of the point $p = (p_1, \ldots p_d)$ from the plane is $$d(p,h) = \frac{\sum a_i p_i + a_0}{\sqrt{\sum_i a_i^2}}$$
which is a linear expression in $p_i$. Squaring gives you a quadratic in the $p_i$. Now you want to minimize the sum of these squared distances, and that's just a quadratic expression in the $p_i$. Moreover, this expression is convex and therefore has a unique minimum, so taking the partial derivatives and setting them to zero will yield a linear system that you can solve to get the answer.