Mosaic
✓ Published0🌍 Public
AAjayyy
Last edited Jun 14, 2018
Created on Jun 13, 2018
This example generates a mosaic-like pattern of colored polygons using a Poisson disc sampling algorithm to distribute points evenly across a 960 by 500 canvas. The code then creates a Voronoi diagram from these points via `d3.voronoi`, and each resulting cell is filled and stroked with a color derived from the CIE Lab color space using `d3.lab`, based on the cell’s distance from the canvas center. The SVG paths are rendered with D3 v4, and the overall effect is a gradient of hues radiating outward from the middle.
AI-generated descriptionworks with d3.v4
mit Licensed