I have the corner coordinates for a rectangle in 3d space how do i find the coordinates for the center of the rectangle?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have [x1,y1,z1],[x2,y2,z2],[x3,y3,z3],[x4,y4,z4] each representing a corner.
댓글 수: 0
채택된 답변
Nick
2018년 11월 8일
The center of a 3D rectangle is simply the mean of it's corners so a simple solution would be:
% each row is a coordinate, take the mean of the rows
mean([x1 y1 z1; x2 y2 z2; x3 y3 z3; x4 y4 z4],1)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!