Does anyone know the mathematical formula to calculate the radius of a sphere that can be inscribed at the corner of an irregular polyhedron ? There can be several radius, but the sphere should not protrude out of the polyhedron. In 2D it looks something like this. The radius is purely based on the corner angle. But I need for 3D where the corner vertex has n number of faces and the angles are not all equal (something like this).
Thank you in advance, Sincerely, Sumana
In general, I believe your sphere is constrained by $3$ of the $n$ planes that form a corner. So here is one naive approach.
First, solve the problem for a corner comprised of three planes. This amounts to finding the insphere for an irregular tetrahedron. See the Mathematica SE posting, "Insphere for Irregular Tetrahedron":
Second, for each of the $\binom{n}{3}$ triples of planes, solve for the sphere.
Third, for each solution, check whether the other planes cut it.
Fourth, select among the uncut spheres supported by three planes.
A less naive approach would compute the medial axis of the convex cone, which effectively yields all the maximal spheres. Lastly, I suspect the problem can be solved by linear programming.