I have matrix with xyz coordinate.(~20 points)
Else, i have matrix with the coordinates of the points that are the vertices of a plane.
How to choose the points inside of this plane ?
inpolygon function work only at 2D , but i have 3D plane.

댓글 수: 1

dpb
dpb 2014년 12월 5일
Do axis rotation to place plane in 2D???

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

답변 (1개)

Image Analyst
Image Analyst 2014년 12월 5일
편집: Image Analyst 2014년 12월 5일

0 개 추천

Chances are if they're floating point values they won't lie exactly on the plane to the nearest 15 decimal places, so you'll have to check if it's within some tolerance distance of the plane. Can't you just stick the (x,y,z) coordinate values into the equation of your plane and see if the residual is within your tolerance, like
residualDistance = a * x + b * y + c * z + d; % will = 0 if exactly on the plane.
if abs(residualDistance) <= yourToleranceValue
% It's "on" the plane
else
% It's far away from your plane.
end
If my math is wrong, someone please correct it.

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

질문:

2014년 12월 5일

편집:

2014년 12월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by