[vtkusers] Check if point is inside convex hull

lynx.abraxas at freenet.de lynx.abraxas at freenet.de
Tue Nov 17 14:37:22 EST 2009


On 17/11/09 12:41:19, David Doria wrote:
> I broke your example into two parts:
>
> http://www.vtk.org/Wiki/Convex_hull
>
> http://www.vtk.org/Wiki/Check_if_a_point_is_inside_an_object
>
> The convex hull part works fine. However, the "point inside object" part I
> am having trouble with. It compiles, but it says both points are outside the
> sphere. Can someone take a look?

Hi David,

I see You're exampling again even with pics, that's great!
I'm not sure but when I was looking for a function  checking  if  a  point  is
inside  a  closed  surface  I found vtkSelectEnclosedPoints. However I haven't
found the time yet to implement the code using it.
Looking at Your example I would guess that Sphere->FindCell checks if a  point
is  inside  the cell's polygon (eg lying on the polygon surface). I'm not sure
about this but that's what FindCell sounds to me. It would  explain  why  both
points are "outside" since they are not inside a polygon plane.

Thanks,
Lynx



More information about the vtkusers mailing list