Monotone Polygon Triangulation

This is a small toy (made with Dart, compiled to JavaScript), to illustrate the algorithm to triangulate a Monotone Polygon. With this one, it only works for X-Monotone Polygons. You'll find the algorithm starting at page 20 in these lecture notes. For best results I recommend drawing a Simple Polygon. If you give it one that is not, the triangulation may be a little unexpected.

You can find the source code for this program here on GitLab.

Controls: Use the Left Mouse Button to add Points to the Polygon. Right Click to remove the last added Point. If the Polygon turns red, that means that it isn't X Monotone and will not triangulate. At least four Points are needed to Triangulate. Triangulate [Off]

Step

Step Through [Off]

Clear



The Points with a green ring around them are part of the Upper Chain, where as the ones with a purple ring around them are from the Lower Chain. If a ring is filled in with red, that means it's part of the Reflex Chain at that step. The vertical red line marks which Point is currently being tested. The boxes below highlight which case of the algorithm the current Point is hitting.