Declaration ​
TVoronoiSampler = class(TCustomArbitrarySparsePointGradientSampler)Description ​
TVoronoiSampler samples discrete or cell-bounded color regions using Voronoi diagram metric distance partitioning.
Although the Voronoi tesselation can be used as a sparse point color gradient interpolator, it is actually rather a tesselation to discrete solid colors than a color gradient interpolation. However, it might still be relevant for several reasons; Compared to the TInvertedDistanceWeightingSampler, the TVoronoiSampler will be the destination for high power values. At the same time it is related to Delaunay triangulation, which can be used in combination with barycentric interpolation for smooth color gradients.
As the Voronoi sampler typically does not contain any algorithm for antialiasing itself, use of a TSuperSampler might be required for smooth edges
| Direct | Supersampled |
|---|---|
Mathematics & Algorithm ​
Given TVoronoiSampler partitions space into Voronoi cells
The metric function Metric (TVoronoiMetric):
- Euclidean:
- Manhattan:
- Custom: Evaluated via
MetricFunc.
Sampling point