Sorting points in interval
显示 更早的评论
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 个)
Image Analyst
2014-12-5
编辑:Image Analyst
2014-12-5
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!