HOME > TVM Demos > Tessy

Polygon Tessellator

( Run Polygon Tessellator )


 

Overview

Polygon Tessellator allows you to draw an arbitrary polygon and see how it is split up into simple, convex polygons with only a small number of vertices.

Algorithm

  • Create Polygon from points
  • If concave, iterate over each point to find Max-CrossBar-Point
    • Max-CrossBars: the number of crossbars drawn from point to successive points without intersecting poly edges
  • Split Polygon starting at Max-CrossBar-Point to number of max crossbars
  • Create new Polygon from remaining points

Source