Notgnoshi / generative

Generative art. A suite of composable tools to generate, transform and visualize WKT geometries
MIT License
22 stars 3 forks source link

Add GridFormat::Cells output format to grid tool #178

Closed Notgnoshi closed 1 month ago

Notgnoshi commented 1 month ago

Emit each grid cell as a WKT polygon.

The geom2graph polygonization can do this.

$ grid -O graph -W 2 -H 2 | geom2graph --graph2geom
POLYGON((1 0,0 0,0 1,1 1,1 0))
POLYGON((2 0,1 0,1 1,2 1,2 0))
POLYGON((1 1,0 1,0 2,1 2,1 1))
POLYGON((2 1,1 1,1 2,2 2,2 1))