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

조회 수: 5 (최근 30일)
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

채택된 답변

Image Analyst
Image Analyst 2016년 7월 18일
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
sumana
sumana 2016년 7월 19일
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 2016년 8월 6일
편집: sumana 2016년 8월 6일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by