irregular-voronoi

irregular-voronoi makes it dead simple to create voronoi like diagrams constrained to irregular polygons. It ensures that no returned polygon is a MultiPolygon. That each point is in only Polygon. And that all polygons contain a point.

Usage no npm install needed!

<script type="module">
  import irregularVoronoi from 'https://cdn.skypack.dev/irregular-voronoi';
</script>

README

irregular-voronoi

irregular-voronoi makes it dead simple to create voronoi like diagrams constrained to irregular polygons. It ensures that no returned polygon is a MultiPolygon. That each point is in only Polygon. And that all polygons contain a point.

Usage

const irregularVoronoi = require('irrgular-voronoi');

const polygon = { ... };
const points = [ ... ];

const result = irregularVoronoi(polygon, points);