Function Repository Resource:

# PowerDiagram

Generate the power diagram of a set of circles

Contributed by: Jan Mangaldan
 ResourceFunction["PowerDiagram"][{c1,c2,…}] gives a MeshRegion representing the power diagram of the circles c1,c2, …. ResourceFunction["PowerDiagram"][{c1,c2,…},{{xmin,xmax},…}] clips the mesh to the bounds [xmin,xmax]×⋯.

## Details

The circles ci can be Circle or Disk objects.
Point objects are treated as circles with zero radius.
A power diagram is also known as Dirichlet cell complex, Laguerre diagram and Laguerre-Voronoi diagram; it is a generalization of a Voronoi diagram.
A power diagram can be considered as a weighted Voronoi diagram of the circles' centers, with the radii of the circles as weights.
A power diagram consists of n convex cells, each associated with a circle ci, such that a point pi belongs to the cell associated with ci when ci is the circle that minimizes the circle power of pi.
The cells associated with the outer circles will be unbounded, but only a bounded range will be returned. If no explicit range {{xmin,xmax},} is given, a range is computed automatically.
The cells will be convex polygons in 2D.
ResourceFunction["PowerDiagram"] takes the same options as MeshRegion.

## Examples

### Basic Examples (2)

Generate the power diagram of a set of circles:

 In[1]:=
 Out[1]=

Show the power diagram with the generating circles:

 In[2]:=
 Out[2]=

### Scope (2)

Create a power diagram from a set of disks:

 In[3]:=
 Out[3]=

Basic properties:

 In[4]:=
 Out[4]=

Power diagrams are full dimensional:

 In[5]:=
 Out[5]=

Power diagrams are bounded by their clipping values:

 In[6]:=
 Out[6]=

Generate the power diagram of a mixture of Circle and Disk objects:

 In[7]:=
 Out[7]=

### Options (10)

#### MeshCellHighlight (2)

MeshCellHighlight allows you to specify highlighting for parts of a PowerDiagram:

 In[8]:=
 Out[8]=

Individual cells can be highlighted using their cell index:

 In[9]:=
 Out[9]=

Or by the cell itself:

 In[10]:=
 Out[10]=

#### MeshCellLabel (2)

MeshCellLabel can be used to label parts of a PowerDiagram:

 In[11]:=
 Out[11]=

Individual cells can be labeled using their cell index:

 In[12]:=
 Out[12]=

Or by the cell itself:

 In[13]:=
 Out[13]=

#### MeshCellMarker (2)

MeshCellMarker can be used to assign values to parts of a PowerDiagram:

 In[14]:=
 Out[14]=

Use MeshCellLabel to show the markers:

 In[15]:=
 Out[15]=

#### MeshCellStyle (2)

MeshCellStyle allows you to specify styling for parts of a PowerDiagram:

 In[16]:=
 Out[16]=

Individual cells can be highlighted using their cell index:

 In[17]:=
 Out[17]=

Or by the cell itself:

 In[18]:=
 Out[18]=

#### PlotTheme (2)

Use a theme with grid lines and a legend:

 In[19]:=
 Out[19]=

Use a theme to draw a wireframe:

 In[20]:=
 Out[20]=

### Properties and Relations (4)

The output of PowerDiagram is always a full-dimensional MeshRegion:

 In[21]:=
 Out[21]=
 In[22]:=
 Out[22]=

The power diagram of two circles is composed of two half-planes divided by the radical line of the two circles:

 In[23]:=
 Out[23]=

If one circle encloses the other, the cell corresponding to the inner circle is empty:

 In[24]:=
 Out[24]=

The power diagram of a set of circles all having the same radii is equivalent to the VoronoiMesh of the circles' centers:

 In[25]:=
 Out[25]=

The resource function PowerTriangulation is the dual of PowerDiagram:

 In[26]:=
 Out[29]=

## Version History

• 1.0.0 – 18 January 2021

## Author Notes

The current implementation is only limited to the 2D case. An extension to 3D is left for a future update.