isinmesh

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

206 Downloads

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.

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
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
1.1.0.0

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

1.0.0.0