Minimum distance between two polygons

버전 1.2.0.0 (9.73 KB) 작성자: Guillaume JACQUENOT
This function computes the minimum euclidean distance between two polygons P1 & P2.
다운로드 수: 3.1K
업데이트 날짜: 2008/12/16

라이선스 보기

This function computes the minimum euclidean distance between two
polygons P1 & P2.

min_d = min_dist_between_two_polygons(P1,P2,Display_solution);

This function takes two arguments, a third one is optional.
P1 & P2 contain the geometry of polygons.
P1 & P2 are structures containing two fields: x & y
For example:
P1.x = rand(1,5)+2;
P1.y = rand(1,5);
P2.x = rand(1,3);
P2.y = rand(1,3);
Display_solution is a binary variable that enables or not the
plot of the solution.

The function starts by checking if polygons are intersecting.
In this case, the minimum distance is 0.
Otherwise, distances between all vertices and edges of the two
polygons are computed. The function returns the minimum distance found.
Further details of the implementation can be found in the code.

인용 양식

Guillaume JACQUENOT (2024). Minimum distance between two polygons (https://www.mathworks.com/matlabcentral/fileexchange/22444-minimum-distance-between-two-polygons), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Elementary Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

min_dist_between_two_polygons/

버전 게시됨 릴리스 정보
1.2.0.0

Some boundary cases have been taken into account.

1.1.0.0

Some boundary cases have been taken into account.

1.0.0.0