Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate the power diagram of a set of circles
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]×⋯. |
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]= | ![]() |
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]= | ![]() |
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 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 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 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]= | ![]() |
Use a theme with grid lines and a legend:
| In[19]:= |
| Out[19]= | ![]() |
Use a theme to draw a wireframe:
| In[20]:= |
| Out[20]= | ![]() |
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]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License