Find points in 3D polygon using inhull

I have series of points (a 344*3 matrix)forming a 3D polygon. It's actually providing an surface for my desired area.
When I pick up a point by myself within the polygon and test with inhull.m, it always returns me 0. When I check with convhulln function, it seems like it only checking the surface, not the entire thing.
Does anyone know how to fix this problem? Is there a guide I need to follow to form the polygon matrix that checking by the inhull.m?
Thanks,

Réponses (1)

Matt J
Matt J le 19 Fév 2013
inhull isn't a MATLAB stock function, so hard to comment on its behavior. However, since it's a convex polyhedron, you could use VERT2LCON
[A,b]=vert2lcon(points);
is_inside = all(A*x<=b)

Catégories

En savoir plus sur Computational Geometry dans Centre d'aide et File Exchange

Tags

Question posée :

le 19 Fév 2013

Community Treasure Hunt

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

Start Hunting!

Translated by