Maths.Voronoi2d

public static class Maths.Voronoi2d
Planar Voronoi diagrams of weighted point sites (RH-79405), through RHC_GH2_WeightedVoronoi2d. The weighted distance from site i is (t*A_i + 1 - t) * |x - r_i| + (1 - t) * B_i: t = 0 is purely additive (hyperbolic arcs), t = 1 purely multiplicative (circular arcs).

Methods

Compute

#
public static Maths.Voronoi2d.Result Compute(Point2d[] sites, double[] multiplicativeWeights, double[] additiveWeights, double blend, BoundingBox? clip, double tolerance, bool cells, CancellationToken token, out string failureName, out string failureInfo)
Compute the weighted Voronoi diagram of a set of sites.
sites (Point2d[])Site locations.
multiplicativeWeights (double[])One positive weight per site, or null for all ones.
additiveWeights (double[])One weight per site, or null for all zeros.
blend (double)0 for purely additive, 1 for purely multiplicative.
clip (BoundingBox?)Clip rectangle in the XY plane, or null for the sites' box grown by a quarter.
tolerance (double)Fit tolerance for the quartic edges; 0 or less for 1e-6 times the clip diagonal.
cells (bool)Whether to also assemble the cell loops.
token (CancellationToken)Cancellation token; when cancelled the method returns null without a failure.
failureName (out string)Short failure title, or null.
failureInfo (out string)Failure details, or null.