Radius of the sphere inscribed at the corner of an irregular polyhedron

3 views (last 30 days)
This is more about Mathematics than Matlab, but I am coding using Matlab. I appreciate any kind of help.
I am looking for 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 is easy to implement as only two edges are associated with a vertex. 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.
Thank you in advance, Sincerely, Sumana

Accepted Answer

Image Analyst
Image Analyst on 18 Jul 2016
You can make a solid out of your vertex definitions, then you can use bwdist() to get the distance transform. The max of the distance transform is the radius of the largest sphere that will fit into your polyhedron.
  11 Comments
sumana
sumana on 19 Jul 2016
Thank you Sven, I truely appreciate the help. This is definitely one of the methods to get the radius. Very useful code. Thank you.
sumana
sumana on 6 Aug 2016
Edited: sumana on 6 Aug 2016
Hi Sven,
I was wondering why for the below vertex and faces the sphere is outside of the volume ? v_new =[1.1406 -0.2822 -0.6430; 0.5412 0.4604 0.6889; 0.4970 0.0695 0.7283; 0.3039 -0.6663 0.8086; -0.4781 0.0484 0.7862; 0.0106 0.7567 0.6914]; f_new=[1 2 3; 1 3 4; 1 4 5; 1 5 6; 1 6 2; 3 4 5; 2 3 5; 2 5 6]; like in fig 1.
And for the below vertices and faces the radius is zero so there is no sphere:
v_new=[ -1.2447 -0.2718 -0.2752; -0.3506 -0.9481 -0.1062; -0.4711 -0.1870 -0.9955; -0.7644 0.4948 -0.4761; -0.7186 -0.0521 0.4532]; f_new=[1 2 3; 1 3 4; 1 4 5; 1 5 2; 2 3 4; 2 4 5];
Could you please help ? Thank you

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!