Computing the closest point inside an intersection of half-spaces
This can be modeled as a convex program
$$\begin{align}
\text{min.} \qquad &amp; ||x-p||_2^2,\\
\text{s.t.} \qquad &amp; Ax\leq b,\\
&amp; x\in\mathbb{R}^3.
\end{align}$$
and solved (in reasonable time) by standard solvers. Here's example code in julia

using Convex, SCS

# generate random problem data
m = 5;  n = 3
A = randn(m,n); b = randn(m,1); p=randn(3,1)

# define problem
x = Variable(n)
problem = minimize(sumsquares(x-p), [A*x&lt;=b])

# solve
solve!(problem, SCSSolver())
println("Status $(problem.status) distance $(problem.optval)")