[vtkusers] get a point inside a vtkPolyData
Jonathan Morra
jonmorra at gmail.com
Fri Feb 25 13:09:08 EST 2011
Also the filter vtkSelectEnclosedPoints is failing for me with the error,
"No cells to subdivide". Any idea why?
On Fri, Feb 25, 2011 at 10:07 AM, Jonathan Morra <jonmorra at gmail.com> wrote:
> But what if I happen to pick an inflection point, then both could fail.
>
>
> On Fri, Feb 25, 2011 at 10:06 AM, David Doria <daviddoria at gmail.com>wrote:
>
>> On Fri, Feb 25, 2011 at 1:00 PM, Jonathan Morra <jonmorra at gmail.com>wrote:
>>
>>> I understand everything except the last part. How do I know if I move
>>> epsilon along the vector I have my point?
>>>
>>>
>> Consider a unit circle as the polygon, and that you have the point (0,1)
>> on the polygon. Say you picked the vector (.5, .5). You could move to a new
>> point
>>
>> (0,1) + epsilon * normalize( (.5,.5) )
>>
>> and do the point-in-polygon test. It will fail in this case (if it passes,
>> you're done). So instead, move to the point
>>
>> (0,1) - epsilon * normalize( (.5,.5) )
>>
>> and it should be inside the polygon.
>>
>> David
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110225/5f103c8d/attachment.htm>
More information about the vtkusers
mailing list