ALGO: try to implement y-monotonization

This commit is contained in:
2015-01-08 01:44:47 +01:00
parent b6b9cead2a
commit 6b873e9e5c
2 changed files with 47 additions and 0 deletions

View File

@@ -264,3 +264,12 @@ polyTriCategorizedPoints = Diag f
vcatToCol VMerge = pink
vcatToCol VRegular = yellow
monotonePolys :: Diag
monotonePolys = Diag f
where
f _ vts = foldl (\x y -> x <> strokePoly y) mempty
$ monotonize (concat vts)
where
strokePoly x' = fromVertices $ x' ++ (maybeToList . headMay $ x')