How this calculation works
Construct a clipped power diagram from planar sites with additive squared-distance weights. The output gives each convex cell and its area, including empty cells, and checks that the cell areas cover the clipping polygon.
Cell_i=P∩{x:||x−s_i||²−w_i≤||x−s_j||²−w_j for every j}.A worked example
Sites(0,0)with weight0 and(2,0)with weight4 have equal power on x=0. Inside the rectangle[−1,3]×[−1,1], their cells therefore have areas2 and6. Equal weights would instead split at x=1, giving areas4 and4.
Good to know
2–30 distinct planar sites with scalar weights,finite values within±1000000;3–20 consecutive convex polygon vertices. Numerical half-plane clipping and area conservation check. Empty cells allowed. Weights are squared-distance offsets,not multiplicative distance factors or geographic radii.
A weight shifts squared distance additively
The power of a query point relative to site i is its squared Euclidean distance from that site minus the entered weight. The cell contains points where that value is no larger than the value for any competitor.
A larger weight makes its site more competitive under this sign convention. The weights are not ordinary distance multipliers. Negative values are mathematically valid offsets, even when they cannot be interpreted as squares of physical circle radii.
Compare this with the Voronoi diagram calculator from points with Delaunay dual. Ordinary Voronoi assumes equal weights and cannot produce the radical-axis power partition.
Clip all cells to one convex region
The polygon supplies the finite region whose area is partitioned. Enter its vertices consecutively around the boundary. The implementation checks a positive-area convex shape, normalizing clockwise versus counterclockwise order.
Sites may lie outside that polygon and can still win part of its interior. Their coordinate positions must be distinct; coincident sites would require special handling for identical or completely dominated power functions. The page rejects that ambiguity rather than inventing duplicate cells.
Pairwise comparisons become linear half-planes
Expanding two squared distances cancels the common quadratic term x·x. The comparison therefore reduces to a line inequality whose normal is twice the difference of site coordinates and whose offset includes both weights.
Intersecting the polygon with all of one site’s comparison half-planes constructs that site’s cell. Repeating this operation for every site permits a direct check that nonnegative cell areas sum to the original polygon area, up to numerical tolerance.
The weighted split moves from one to zero
For the default sites, the first power is x²+y². The second is(x−2)²+y²−4=x²+y²−4x, so equality occurs at x=0 rather than the unweighted midpoint x=1.
Within the displayed four-unit-wide rectangle, the first cell spans one unit horizontally and the second spans three. Both have height two, giving areas two and six. This checks the weight sign and squared-distance convention explicitly.
An empty cell is a legitimate outcome
A sufficiently disadvantaged site can lose every point in the clipping region, even when its coordinates lie inside that region. Its returned area is zero and the empty status should be read as part of the mathematical result.
Other cells may still cover the full region. The area-sum residual checks that no substantial area vanished or was counted twice during clipping; it does not assert an exact symbolic arrangement or resolve arbitrarily close degeneracies.
Interpret the boundary and numerical tolerances
Points on a shared radical axis tie between two sites. Including them in both closed cells does not duplicate positive area because the common boundary has zero planar area. Small repeated clipping vertices are removed numerically.
Nearly coincident coordinates and extreme weights can make thin cells hard to resolve. The explicit finite coordinate bounds and conservation tolerance define this implementation’s scope. It does not provide spherical power diagrams or ellipsoidal geographic distance.
Use a power partition for its actual model
Power cells can illustrate additive influence or weighted geometric competition when a squared-distance objective is intended. Inspect each site’s cell vertices and area rather than treating a large input weight as an automatic assigned quota.
If the goal is to achieve prescribed cell areas, an additional weight optimization problem is needed. This calculator evaluates weights supplied by the user; it does not fit them, infer travel costs or promise equal-area service regions.
A few questions, answered
Does a larger weight enlarge a site’s advantage?
Yes. Weight is subtracted from squared distance, making larger values more competitive.
Can a site have no cell?
Yes. Empty cells are valid when that site loses everywhere in the clipping polygon.
Are weights ordinary radius values?
No. They are squared-distance offsets; a nonnegative weight can optionally be interpreted as radius squared.
Does this choose weights to match area quotas?
No. It evaluates the entered weights and reports the resulting cell areas.