Is there an efficient way to calculate, given a point, the closest point to it that's on the inside of an intersection of half-spaces?
For example, given the half-spaces a & b, the closest point to p that's "inside" the half-spaces is x. +s denote which side is "inside" the half-spaces a and b.
.p
^
|
|
| x
<---.--------------> b
| +
|
| +
|
v a
I'm particularly interested in a method that works for half-spaces in 3D (planes).
My current line of thinking has me calculate the intersections between each combination of half-spaces, and then find the shortest point by picking from the shortest distance to each half-space and each intersection (line, point) that's also within all the half-spaces.
Is there a better way?