Re: inpolygon in 3D



John D'Errico wrote:
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

MMM...I'm keeping on reading your message, but:
1) I don't understand how do you form simplex
2) what do u mean with baricentric
3) why the final check is in the interval [0,1]
Regarding tessellation, I think that a closed 3D patch could be considered a tessellation...isn't it?

Sorry for double reply,
Gab
.



Relevant Pages

  • 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)
  • Re: inpolygon in 3D
    ... barycentric coordinates for each point in each simplex. ... A second bonus is it works in n-dimensions. ... convex, so these factors were all importance. ... The best material model of a cat is another, or preferably the same, cat. ...
    (comp.soft-sys.matlab)
  • Re: inpolygon in 3D
    ... you already have a tessellation of the 3D polygon that is boundary ... Now I got how it works for convex 3D object...however in my case I have a not convex object. ... I need to determine some geometrical quantities related to the area of the intersection between this body and the free surface. ...
    (comp.soft-sys.matlab)