Sorting points in interval
Mostra commenti meno recenti
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 Commento
dpb
il 5 Dic 2014
Do axis rotation to place plane in 2D???
Risposte (1)
Image Analyst
il 5 Dic 2014
Modificato: Image Analyst
il 5 Dic 2014
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.
Categorie
Scopri di più su Shifting and Sorting Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!