non-crossing perfect matching utilized for randomly-generated tesselations
https://en.wikipedia.org/wiki/Catalan_number
requires uv. first uv run builds the env from pyproject.toml.
$ uv run python3 -m ncpm.draw --helpsquare tiles. pass intersection point counts for horizontal and vertical edges:
$ uv run python3 -m ncpm.draw 2 3 --grid --curve formulaic --grid-size 12 --saturation 60hex tiles. add a third positional for the third edge type (opposite edges share the count):
$ uv run python3 -m ncpm.draw 3 1 3 --grid --grid-size 24 --saturation 60one tile is one non-crossing perfect matching. grids align intersection points across shared edges so curves connect tile to tile.
![]() square |
![]() hex |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |








