Minimal Bounding Box

버전 1.1.0.0 (5.04 KB) 작성자: Johannes Korsawe
Minimal bounding box around points in the (x,y,z) space
다운로드 수: 5.3K
업데이트 날짜: 2015/2/16

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

With this function one can easily compute the minimal box (with right angles) around a set of points in 3d.
The extremal property of the box is determined either in terms of volume, surface or sum of edgelengths.

The calculation is based on heuristics only, but a huge number of tests did not show any counterexamples yet.

The algorithm behind the function is subdivided into three levels of accuracy with differing runtimes.

x = rand(10000,1);
y = rand(10000,1);
z = rand(10000,1);

tic;[rotmat,cornerpoints,volume,surface] = minboundbox(x,y,z,'v',3);toc
Elapsed time is 10.772170 seconds.

volume =
0.9993
surface =
5.9974

My thanks to John d'Errico and Roger Stafford for numerous discussions about proofs and algorithms in this context.

John also wrote minboundrect from the FEX, which heavily influenced this submission.

Also in this archive i included a small plot function (plotminbox) to show the resulting box via connecting the cornerpoints.

인용 양식

Johannes Korsawe (2024). Minimal Bounding Box (https://www.mathworks.com/matlabcentral/fileexchange/18264-minimal-bounding-box), MATLAB Central File Exchange. 검색됨 .

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

Community Treasure Hunt

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

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

Compatability issues. Convhull changed in Release 2010a.

1.0.0.0