# Voronoï playground : interactive weighted Voronoï study

Full Screen

This block experiments weighted Voronoï diagram. Weighted Voronoï diagram comes in severall flavours (additive/multiplicative, powered/not-powered, 2D/3D and highier dimensions, …), but this block focuses on the 2D additive weighted power diagram. It helps me to understand the basics (properties, underlying computations, meanings, …) of such diagram.

From Wikipedia, the additively weighted power diagram is defined when positive weights are subtracted from the squared euclidian distances between points. The distance of a pixel from a site is the additive weighted power distance, further references as awp-distance. For any point of the 2D plan, the closest site is the one with the minimal awp-distance.

I choose this kind of weighted Voronoï diagram because the resulting tessellation is made of concave polygons/cells with straight borders, as the default Voronoï diagram does. Using non-squared distances results in hyperbolic borders.

#### What are you seeing ?

• there is 2 sites (one blue and one green), with their corresponding influence areas (i.e. cells)
• circles around sites are their respective unit-circles (awp-distance=1); they give a sense of the weight of each site
• the matrix represents pixels and centers of pixels; for each pixel, I added the awp-distance from each site; if the awp-distance from the blue site is lower than the awp-distance from the green site, then the pixel is closer to the blue site and is part of the blue influence area (and vice-versa)

#### User interactions :

• you can change the weight of each site with the corresponding slider
• you can drag and drop each site

#### Unobvious things I’ve discovered :

• the basic Voronoï diagram is obtained when all sites have the same weight; it could be 0 (default value used in Voronoï diagram algorithm), or anything else (you can experiment this by setting the exact same weight for the two sites; in this case, the border line remains at the center of the two sites)
• when a site overweight the other (eg. when the unit-circle of the first site encloses the second site) the cell of the overweighted site still exists but the site is out of its cell (you can experiment this by maximizing the weight of one site, or drag a site inside the unit-circle of the other); if we extend the reasoning with a third site (or more), a site may no longer have any zone of influence !
• when the two sites have the exact same position, then all depends on weights: the site with the highiest weight wins!
• weights may be negative, but I’m not sure if this has any meaning