Relax Points
Applies Lloyd relaxation to a set of points inside an area.
Node id tessellation/relax-points
The Relax Points node applies Lloyd relaxation to a collection of points inside an area. In each iteration, every point that produces a Voronoi cell moves to the area centroid of its cell. This evens out point distributions into more uniform, honeycomb-like arrangements.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| points | Array<Point> | — | |
| area | BoundingBox | — | |
| iterations | number | 1 |
Outputs
Behaviour
- Iterations.
iterations(default 1) controls how many relaxation steps to perform. Settingiterationsto 0 returns the input points unchanged. Higher numbers make cell sizes and point spacings progressively more uniform. - Outside points. Points outside the area that produce a cell move to its clipped centroid, which brings them inside the area.
- Duplicate and skipped points. Points that produce no cell or are exact duplicates stay at their current position. Output order and length always match the input points.
Errors
areamust be connected (for example from Make BoundingBox or Page).iterationsmust be an integer between 0 and 100.- Non-finite coordinates in
areaor in any point ofpointsare node errors. - Providing more than 10 000 points is a node error.
Example
Voronoi cells before and after Lloyd relaxation.
Related nodes
- Voronoi tessellation: worked example with jittering, relaxation and gaps.
- Voronoi: computes Voronoi cells from a set of points.
- Orthogonal Grid: generates a regular grid of points.
- Polygon: shape type for Voronoi cells.