<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Some of you have noted that when you use the ear-clipping
algorithm to tesselate something like <br>
</p>
<img alt="unfilled" src="cid:part1.3F694A37.1A1665E7@mercer.edu"
height="640" width="602"><br>
<br>
you actually end up with...<br>
<br>
<img alt="filled" src="cid:part2.02B0CF2F.0BAEDF8B@mercer.edu"
height="640" width="602"><br>
<br>
<br>
This is happening because I may not have been clear on the check
related to "can I draw the line back to the initial vertex". I
think in class I may have made it too simple -- I stated that as
long as the line did not intersect any other lines in the polygon.
In addition the line connecting the point back to the vertex must
lie in the INTERIOR of the polygon.<br>
<br>
There are multiple ways to check for this, but the easiest in my
opinion is to check the angle back to the original vertex and the
angle of the next vertex in the list. If the angle to the next
vertex in the list is less than the angle to the initial point, then
you can't tesselate that triangle and you have to move to the next
one in the list.<br>
<br>
Sit down with a piece of paper and play with it for a few minutes
and it should make sense. If not, see me.<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</body>
</html>