Skip to content

ScrambledRK/traversal-splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TraversalSplitter

This is a haxe implementation of an algorithm that partitions orthogonal polygons into several small rectangular areas. A more detailed description about the algorithm can be found on my blog.

AlgorithmRundown

  1. traverse the polygon clockwise and find vertices with counterclockwise rotation
  2. split the graph from those vertices to any direction
  3. pick a vertex and traverse the adjusted graph clockwise to build your rectangle

runtime:

  • multiple platform targets supported
  • simple input / output interface

development-time:

  • confusing line intersection algorithm
  • monster class