maxCircleInConvexPo​ly

버전 1.0.0 (4.57 KB) 작성자: Mitchell Tillman
Determines the origin position and radius of the largest possible circle within a convex 2D polygon - vertices specified as an Nx2 matrix.
다운로드 수: 16
업데이트 날짜: 2020/7/19

라이선스 보기

Determines the origin position and radius of the largest possible circle within a convex 2D polygon with N vertices. Polygon vertices are specified as an Nx2 matrix, per Matlab's "boundary" function, and 'shrinkage' is the third input argument.

Algorithm: First, the polygon is rotated so that one side lies on the x-axis. Starting from its vertex, a "balloon" (circle) is created, which iteratively "expands" along the vector bisecting that vertex until the next side is reached. This process continues with new bisecting vectors each time the balloon hits a new side until the maximum distance is reached. See comments in code for details.

The maximum distance and circle origin position are rotated back to the original before being output.

Optional plotting commands are included to view the steps of the process. The two required subfunctions are included in the one .m file.

인용 양식

Mitchell Tillman (2024). maxCircleInConvexPoly (https://www.mathworks.com/matlabcentral/fileexchange/78408-maxcircleinconvexpoly), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2020a
R2014b 이상 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0