Version (1.55 KB) by jon ander
Simple function that tells if a point is inside of a mesh, be it concave or convex


Updated 24 Apr 2012

View License

The algorithm just finds the intersection points between the facets and a vertical line that passes through the original point. Depending on the relative position of the intsersection points and the facet normals it decides whether the point is outside or inside the volume.




a: structure with a.vertices and a.facets
p: [x y z] coordinates of the point to be studied


inout: 1 or 0 (in or out)

Cite As

jon ander (2023). isinmesh (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

-correction of the summary, it was too ambiguous.
-futher information about the function