Recursive polygon subdivision, part 2
Here the seed polygon (40-gon) is recursively cut using sweeping perpendicular lines and the resulting number of polygons varies greatly depending on the position of these cuts (combined with a configured minimum poly target area). The area of each polygon is mapped to a color from a predefined gradient.
Live demo (slowed down to better observe the algorithm):
https://demo.thi.ng/umbrella/poly-subdiv/
Commented source code:
https://github.com/thi-ng/umbrella/blob/develop/examples/poly-subdiv/src/index.ts
2/2
#TextureTuesday #ThinSection #Geometry #Polygon #Subdivision #Recursion #AlgorithmicArt #ThingUmbrella #TypeScript