Re: inpolygon in 3D



In article <e1mttn$tnj$1@xxxxxxxxxxxxx>, Gabriele Bulian <ruga@.REMOVENOSSSSPAM.libero.it> wrote:

b wrote:
If it's convex polygon, then there is function "inhull" at file
exchange which can do what ever you are loking for.

Is there something for the case of a closed 3D solid (not necessarily
convex) defined by a patch a for which, at each face, the outer normal
is known?


My approach, where a tessellation exists, is to compute
barycentric coordinates for each point in each simplex.

Its easier than it seems, since it only takes a single
massive matrix multiply. You can be careful here and
block it as I do so the problem does not exceed the
available memory.

If the coordinates are all in the interval [0,1],
then a point is inside that simplex. Clearly this is
insensitive to convexity of the overall object. And
as a bonus, it even provides a simple way to allow a
tolerance. A second bonus is it works in n-dimensions.
The objects I've tended to work with were often not
convex, so these factors were all importance.

If all you have is a hull, it is still possible to
generate a tessellation, even if its not convex.

John



--
The best material model of a cat is another, or preferably the same, cat.
A. Rosenblueth, Philosophy of Science, 1945

Those who can't laugh at themselves leave the job to others.
Anonymous
.



Relevant Pages

  • Re: inpolygon in 3D
    ... Is there something for the case of a closed 3D solid (not necessarily convex) defined by a patch a for which, at each face, the outer normal is known? ... My approach, where a tessellation exists, is to compute ... barycentric coordinates for each point in each simplex. ... A second bonus is it works in n-dimensions. ...
    (comp.soft-sys.matlab)
  • Re: inpolygon in 3D
    ... barycentric coordinates for each point in each simplex. ... convex, so these factors were all importance. ... Given any 4-simplex (tetrahedron) in the 3-d space, ... this unique linear combination. ...
    (comp.soft-sys.matlab)
  • Re: Winternitz Theorem
    ... On the union of convex bodies with no interior point in common. ... nonsimplicial set cut from a fixed $d$-simplex by one of the hyperplanes ... through the center of gravity of the simplex and parallel to a facet of ...
    (sci.math.research)