But what if I happen to pick an inflection point, then both could fail.<br><br><div class="gmail_quote">On Fri, Feb 25, 2011 at 10:06 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im">On Fri, Feb 25, 2011 at 1:00 PM, Jonathan Morra <span dir="ltr">&lt;<a href="mailto:jonmorra@gmail.com" target="_blank">jonmorra@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I understand everything except the last part.  How do I know if I move epsilon along the vector I have my point?<div><div></div><div><br></div></div></blockquote><div class="gmail_quote">
<br></div></div>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</div><div class="gmail_quote"><br></div><div class="gmail_quote">

(0,1) + epsilon * normalize( (.5,.5) )</div><div class="gmail_quote"><br></div><div class="gmail_quote">and do the point-in-polygon test. It will fail in this case (if it passes, you&#39;re done). So instead, move to the point</div>

<div class="gmail_quote"><br></div><div class="gmail_quote">(0,1) - epsilon * normalize( (.5,.5) )</div><div class="gmail_quote"><br></div><div class="gmail_quote">
and it should be inside the polygon.</div><div class="gmail_quote"><br></div><font color="#888888"><div class="gmail_quote"><div>David</div></div>
</font></blockquote></div><br>