isinmesh
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.
USAGE
inout=isinmesh(a,p)
INPUT
a: structure with a.vertices and a.facets
p: [x y z] coordinates of the point to be studied
OUTPUT
inout: 1 or 0 (in or out)
Cite As
jon ander (2023). isinmesh (https://www.mathworks.com/matlabcentral/fileexchange/36326-isinmesh), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.