Re: inpolygon in 3D
- From: John D'Errico <woodchips@xxxxxxxxxxxxxxxx>
- Date: Fri, 14 Apr 2006 16:53:47 GMT
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
.
- Follow-Ups:
- Re: inpolygon in 3D
- From: Gabriele Bulian
- Re: inpolygon in 3D
- From: Gabriele Bulian
- Re: inpolygon in 3D
- References:
- inpolygon in 3D
- From: hong
- Re: inpolygon in 3D
- From: b
- Re: inpolygon in 3D
- From: Gabriele Bulian
- inpolygon in 3D
- Prev by Date: Re: How to pass parameters to myfun when call fmincon
- Next by Date: Diameter of a closed curve
- Previous by thread: Re: inpolygon in 3D
- Next by thread: Re: inpolygon in 3D
- Index(es):
Relevant Pages
|