<div class="gmail_quote">On Fri, Feb 25, 2011 at 1:00 PM, Jonathan Morra <span dir="ltr"><<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>></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 class="h5"><br></div></div></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote">
<br></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're done). So instead, move to the point</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><meta http-equiv="content-type" content="text/html; charset=utf-8">(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><div class="gmail_quote"><div>David</div></div>