
Output: the largest inscribed circle in P. 1. Compute h_{1}, h_{2}, ..., h_{n}, determined by edges of P and O(x_{0}, y_{0}, z_{0}). 2. Compute normal vectors V_{1}, V_{2}, ..., V_{n} to h_{1}, h_{2}, ..., h_{n}. 3. Compute lines l_{1},l_{2},..., l_{n} , determined by O(x_{0}, y_{0}, z_{0}) and V_{1}, V_{2}, ..., V_{n} . 4. Compute points Q(Q_{1}, Q_{2}, ..., Q_{n}) as the intersection of l_{1},l_{2},..., l_{n} with the sphere. 5. Compute planes h'_{1}, h'_{2}, ..., h'_{n} tangent to the sphere at points Q(Q_{1}, Q_{2}, ..., Q_{n}) . 6. Compute the vertex K of the polyhedral region as the intersection of h'_{1}, h'_{2}, ..., h'_{n} . 7. Compute the line l_{0} , determined by K(x_{k}, y_{k}, z_{k}) and O(x_{0}, y_{0}, z_{0}) . 8. Compute the center of the minimum circle C_{min} containing Q(Q_{1}, Q_{2}, ...,Q_{n}) . 9. Compute the largest inscribed circle C_{max} by using the relation between the aperture angles of the cone defined by C_{max} , O(x_{0}, y_{0}, z_{0}) and the polar cone defined by C_{min} , O(x_{0}, y_{0}, z_{0})
The source code is available. USEFUL LINKS 