mpower User's Guide
pwrvtx.f mPower Reference Home

pwrvtx computes the Power diagram vertices and the unbounded Power diagram edges for a set of points in 3-d space from a Regular tetrahedralization for the set.

This page documents the FORTRAN program pwrvtx.f, not the pwrvtx Mathematica encapsulation, which is documented here.

The following paragraphs (through the horizontal line) are quoted verbatum from the source code. The remainder of this page is an interpretation, largely taken verbatum, of the comments in the code.

A Power diagram is essentially a Voronoi diagram with weights.

If no weights are present the program will compute the Voronoi diagram vertices and the unbounded Voronoi diagram edges for the set of points from a Delaunay tetrahedralization for the set.

It is assumed that a Regular/Delaunay tetrahedralization for the set of points has already been computed using existing program regtet and that the output tetrahedron list produced by regtet contains only real tetrahedra (no artificial ones), i. e. logical variable artfcl was set to .false. during the execution of regtet. The output tetrahedron list from regtet is then used as input below. It is noted that because of degeneracies more than one tetrahedron may correspond to the same Power/Voronoi vertex. In addition, because of degeneracies, Power/Voronoi cells of points may have facets that are not 2-dimensional, and if weights are present there may be Power cells of points that are not 3-dimensional.

Subroutine pwrvtx is the driver routine of the program and is called from the main routine.


The original pwrvtx and regtet software by J. Bernal can be downloaded here. Any questions regarding the FORTRAN should be directed to the author and not to us! (We are just using the program, we are very grateful thank you, but did not develop it and can take no credit nor give any help with it, thank you very much).


Files Used by pwrvtx

Number*File NameFile TypeDescription
11pnts-wghtsinputregtet input file
12tetrahedrainputregtet output file
13power-vrtsoutputPower/Voronoi vertices
14tetra-unbdoutputFinal Tetrahedralization Information
*Fortran unit

pwrvtx Output File: power-vrts

nw (integer) nt (integer) nq (integer)  


ifl (nq 1's or 0's at 1 character spacing, 40 values per line for a total of nq values, the last line may have fewer than 40 values)

xp1 yp1 zp1
xp2 yp2 zp2
... ... ...
xpnq ypnq zpnq

pwrvtx Output File: tetra-unbd

ideli ipnti iflpi iarti irani ireci iredi
nw nq icfig (iwfig)
icon1,1 icon2,1 icon3,1 icon4,1 icon5,1 icon6,1 icon7,1 icon8,1
icon1,2 icon2,2 icon3,2 icon4,2 icon5,2 icon6,2 icon7,2 icon8,2
... ... ... ... ... ... ... ...
icon1,nq icon2,nq icon3,nq icon4,nq icon5,nq icon6,nq icon7,nq icon8,nq


is (nw values, 7 values per line for a total of nw values, the last line may have fewer than 7 values)

wlenx wleny wlenz (wlenw)
naddl

The flags on the first two and last two lines are the defined in the same manner as for regtet.f.

Arrays xp, yp, zp, icon, ifl will contain output information. For i=1,...,nt, xp(i), yp(i), zp(i) will be the coordinates of the Power/Voronoi vertices.

For i=nt+1,...,nq, xp(i), yp(i), zp(i) will be the coordinates of the unbounded edges.

For j=1,...,8, i=1,...,nt, icon(j,i) will be the input tetrahedron list modified to include unbounded edges neighbor information.

For j=1,...,8, i=nt+1,...,nq, icon(j,i) will be the unbounded edges list which is an extension of the modified input tetrahedron list and is obtained by treating unbounded edges as tetrahedra with one vertex, vertex 0, at infinity.

For i=1,...,nt, ifl(i) will equal 1 if the size of Power/Voronoi vertex i is not considered to be too large.

If the size of vertex i is considered to be too large ifl(i) will equal 0.

For i=nt+1,...,nq, ifl(i) will equal 2.