[CSC 315] A special case of tesselation
Andrew J. Pounds
pounds_aj at mercer.edu
Sat Sep 22 06:13:51 EDT 2018
Thanks to Phuc for remininding me about this last night. In the ear
clipping algorithm your proposed "line back to the starting vertex" must
not intersect any other lines. It also must be in the interior of the
polygon. For example. If you were to try and tesselate the following
simple figure using only the constraints that the the proposed line does
not intersect any other line segments...
specialtess0
you would have an issue because the red line (which would be the
proposed line back to the first vertex) would not intersect any other
lines, but would also be outside of the polygon.
t1
The fix for this is relatively straightforward. Compute the angles
alpha and beta as shown.
t2
and if alpha is less than beta then the proposed line back to the first
vertex is in the interior of the polygon and you are able to are able to
draw the line and complete the ear clipping. This is another great
place for a boolean function to test if the proposed line is in the
interior of the polygon.
--
Andrew J. Pounds, Ph.D. (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
http://faculty.mercer.edu/pounds_aj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20180922/5bc94fc6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: special_tess_0.png
Type: image/png
Size: 65020 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20180922/5bc94fc6/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: special_tess_1.png
Type: image/png
Size: 72695 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20180922/5bc94fc6/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: special_tess_2.png
Type: image/png
Size: 79498 bytes
Desc: not available
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20180922/5bc94fc6/attachment-0005.png>
More information about the csc315
mailing list