24
Computational Geometry 25 (2003) 233–256 www.elsevier.com/locate/comgeo A circle packing algorithm Charles R. Collins , Kenneth Stephenson 1 Department of Mathematics, University of Tennessee, 37996-1300 Knoxville, TN, USA Received 24 August 2001; received in revised form 18 February 2002 Communicated by P. Agarwal Abstract A circle packing is a configuration P of circles realizing a specified pattern of tangencies. Radii of packings in the euclidean and hyperbolic planes may be computed using an iterative process suggested by William Thurston. We describe an efficient implementation, discuss its performance, and illustrate recent applications. A central role is played by new and subtle monotonicity results for “flowers” of circles. 2003 Elsevier Science B.V. All rights reserved. Keywords: Circle packing; Conformal geometry; Discrete Dirichlet problem Introduction A circle packing is a configuration P of circles realizing a specified pattern of tangencies. As such, it enjoys dual natures—combinatoric in the pattern of tangencies, encoded in an abstract “complex” K , and geometric in the radii of the circles, represented by a radius “label” R. As an early example, Fig. 1 displays a simple complex K and a circle packing having its combinatorics. More substantial packings involve several hundred thousand circles. Our problem. Given a complex K and appropriate “boundary conditions”, compute the radii of the corresponding circle packing for K . * Corresponding author. E-mail addresses: [email protected] (C.R. Collins), [email protected] (K. Stephenson). 1 The author gratefully acknowledges the support of the National Science Foundation and the Tennessee Science Alliance. 0925-7721/03/$ – see front matter 2003 Elsevier Science B.V. All rights reserved. doi:10.1016/S0925-7721(02)00099-8

A circle packing algorithm

Embed Size (px)

Citation preview

Page 1: A circle packing algorithm

Computational Geometry 25 (2003) 233–256o

gs inhurston.tral role

uch,”1ings

the

Alliance.

www.elsevier.com/locate/comge

A circle packing algorithm

Charles R. Collins∗, Kenneth Stephenson1

Department of Mathematics, University of Tennessee, 37996-1300 Knoxville, TN, USA

Received 24 August 2001; received in revised form 18 February 2002

Communicated by P. Agarwal

Abstract

A circle packing is a configurationP of circles realizing a specified pattern of tangencies. Radii of packinthe euclidean and hyperbolic planes may be computed using an iterative process suggested by William TWe describe an efficient implementation, discuss its performance, and illustrate recent applications. A cenis played by new and subtle monotonicity results for “flowers” of circles. 2003 Elsevier Science B.V. All rights reserved.

Keywords:Circle packing; Conformal geometry; Discrete Dirichlet problem

Introduction

A circle packing is a configurationP of circles realizing a specified pattern of tangencies. As sit enjoys dual natures—combinatoricin the pattern of tangencies, encoded in an abstract “complexK ,andgeometricin the radii of the circles, represented by a radius “label”R. As an early example, Fig.displays a simple complexK and a circle packing having its combinatorics. More substantial packinvolve several hundred thousand circles.

Our problem. Given a complexK and appropriate “boundary conditions”, compute the radii ofcorresponding circle packing forK .

* Corresponding author.E-mail addresses:[email protected] (C.R. Collins), [email protected] (K. Stephenson).

1 The author gratefully acknowledges the support of the National Science Foundation and the Tennessee Science

0925-7721/03/$ – see front matter 2003 Elsevier Science B.V. All rights reserved.doi:10.1016/S0925-7721(02)00099-8

Page 2: A circle packing algorithm

234 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

ii. In thiserbolic

rstonture.)imation

[29].discrete4,25],There

fit from

eousglobalystemometric

urston.] have

on theetricaler, thepackage

blem.heoryl/globaltability,gs, open

Fig. 1. A simple packing example.

There now exists a rather complete theory covering the existence and uniqueness of these radpaper we describe an efficient algorithm for numerically approximating them in euclidean and hypgeometry.

Though circle packings appear first with Koebe [23], they were rediscovered by William Thuin [34]. (Important note: our circle packings are NOT those in the extensive “sphere packing” literaThurston conjectured in 1985 [35] that maps between circle packings could be used in the approxof classical conformal (analytic) mappings. His conjecture was confirmed by Rodin and SullivanSince then, many additional uses of circle packings, both practical and theoretical have emerged:conformal mapping [16–19,33], analytic function theory [13–15,27,28,31], graph embedding [2discrete potential theory [4,32], conformal tilings [9], and Riemann surface theory [1,6,7,10,37,38].is a significant experimental component to circle packing, so both theory and applications benean efficient implementation.

In computing packing labelsR, one faces large, highly nonlinear, nonstructured, heterogensystems of equations. The underlying geometry plays a central role, with a mixture of local andconsiderations which reflects the “discrete conformal” nature of circle packings; in particular, the sdisplays certain characteristics of classical discrete Laplace equations, including conserved gequantities. The global strategy in our packing algorithm, akin to “relaxation”, was suggested by ThAlternate approaches involving energy minimization and convexity [11] and random walks [32been suggested, but to our knowledge, not implemented on a significant scale.

The key implementation issues in our iterative approach are local in nature, depending heavilyspecial properties of circles, and in particular, on a new “monotonicity” result of independent geominterest. We describe our algorithm in the context of the simplest Dirichlet-type problem; howevimplementation handles much more general situations and is now incorporated in the softwareCirclePack developed by the second author.

In the next section we start with definitions and notation and describe the basic Dirichlet proIn Section 2 we give the monotonicity properties of local circle patterns which are key both in tand practice. The global iterative strategy is described in Section 3, with emphasis on the locainteraction. In Section 4 we lay out our implementation and discuss rates of convergence, sand speed, and provide sample run data. The final section concerns more general circle packinquestions, and selected applications.

Page 3: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 235

1. Definitions and notation

The principal objects of concern are circle packingsP , their complexesK , and their associated

hichocess

lane isat is,

tureithas

faces

.,er,

tices

e

inges

achaken

forelunless

labels (putative radii)R. In fact, the numerical manipulations involve onlyK andR: one solves forthe labelR satisfying desired boundary conditions and meeting numerical “packing” conditions wreflect local geometric compatibility. The circle packing itself results from a simple laying-out prand in particular, circle centers play a purely secondary role.

Geometries. Our algorithm applies in both the euclidean and hyperbolic settings. The euclidean pthe familiar complex planeC. The hyperbolic plane will be represented in the Poincarè disc model: thit consists of the open unit discD = {|z|< 1} equipped with the Riemannian metric of constant curva−1 having length element2|dz|

(1−|z|2) . Note that hyperbolic circles inD are also euclidean circles, though whyperbolic centers and radii. Horocycles, circles internally tangent to∂D, may be consistently treatedcircles of infinite hyperbolic radius with centers at their points of tangency.

Complexes. Packing combinatorics are encoded in abstract simplicial 2-complexesK which triangulateoriented topological surfaces.We restrict to the case in whichK is a finite triangulation of a closedtopological disc, so we have a finite number of vertices (0-simplices), edges (1-simplices), and(oriented 2-simplices). (See the concluding section for comments on the more general cases.)

The vertices ofK are of two types, interior and boundary. Ifu andv are neighboring vertices (i.e〈u, v〉 is an edge ofK) we write u ∼ v. A vertex v and its neighbors form a (combinatorial) flowFv = {v;v1, . . . , vk}: the petalsvj are listed in counterclockwise order aboutv with vj+1 ∼ vj ; k is thedegree ofv, deg(v). Whenv is interior, the list of petals is closed; writingvk+1 = v1, v belongs to thekfaces{〈v, vj , vj+1〉: j = 1, . . . , k}. To avoid minor pathologies, we assume that the set of interior verof K is edge-connected and that every boundary vertex has an interior neighbor.

Packings. A configurationP of circles in the (euclidean or hyperbolic) plane is acircle packingfor Kif it has a circlecv associated with each vertexv of K so that the following conditions hold: (1) if〈u, v〉is an edge ofK , thencu andcv are (externally) tangent, and (2) if〈u, v,w〉 is a positively oriented facof K , then〈cu, cv, cw〉 is a positively oriented triple of mutually tangent circles.

We emphasize that there isno univalencecondition (as occurs in certain parts of the circle packliterature); that is, when verticesv andu are not neighbors, then there is no guarantee that their circlcvandcu have mutually disjoint interiors.

Labels. A label forK is a functionR :K(0) → (0,∞] assigning an (extended) positive value to evertex ofK ; write K(R) for the labeled complex. The archetype, of course, is the “radius label” tfrom a packingP for K , whereinR(v) = radius(cv). In this case we writeK(R) ↔ P to indicatethe association. (Note that the label∞ is permitted only in the hyperbolic setting, and then onlyboundary vertices.) The collection of all labelsR for K will be denotedR. Of course, in general a labrepresents only putative radii; it could not be associated with a coherent configuration of circlesrigid compatibility conditions were satisfied.

Page 4: A circle packing algorithm

236 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

ting.n

eents

g

)ircle,to

in

odel,d

Fig. 2. Triples in the euclidean and hyperbolic planes.

Angle sums. Those all-important compatibility conditions on labels are entirely local in our setLocal compatibility at a vertexv involves the labels of the flowerFv and is expressed in terms of aangle sumθ .

We describe the euclidean case first. Given labelsx, y, z ∈ (0,∞), lay out a mutually tangent tripl〈cx, cy, cz〉 of circles in the plane with radiix, y, z and connect the circle centers with geodesic segmto form a triangleT , as in Fig. 2(a). The triangleT is unique up to rigid motions and the angle ofT atthe center ofcx , denoted byα(x;y, z), can be computed from the labels using the law of cosines:

α(x;y, z)= arccos

[(x + y)2 + (x + z)2 − (y + z)2

2(x + y)(x + z)]. (1.1)

Consider a vertexv and its flowerFv = {v;v1, . . . , vk} in K . The sum of angles associated withv in thevarious faces〈v,u,w〉 ∈K is termed theangle sumat v for labelR, denoted

θ(v;R)=∑

〈v,u,w〉α(R(v);R(u),R(w)),

where the sum is over faces〈v,u,w〉 ∈ K . If {r; r1, . . . , rk} denotes the labels fromR for Fv , thenthe angle sum depends only on these labels. Assumingv is interior, it belongs tok faces and, abusinnotation, we writeθ(v;R)= θ(r; r1, . . . , rk)= ∑k

j=1α(r; rj , rj+1).An elementary but crucial observation:A set of circlescv, cv1, . . . , cvk with the labels fromR as radii

will fit together coherently in the plane if and only ifθ(v;R)= 2πn for some integern� 1. In this case,the petal circles will wrap preciselyn times aroundcv . A nine-petal flower is shown in Fig. 3: in (athe petals wrap once,n= 1; in (b), petals of the same radii wrap twice around the smaller center cn= 2. Angle sums are defined similarly at boundary verticesv, but since their petals are not requiredform a closed chain, a coherent open flower exists irrespective of the angle sum.

The totality of angle sums for the vertices of a labeled complexK(R) may be treated as a pointangle spaceA. Thusθ is a map from label space to angle space,θ :R→ A.

Moving to hyperbolic geometry, similar local considerations apply; recall that in our disc mhyperbolic geodesics are arcs of euclidean circles which intersect∂D at right angles. See Fig. 2(b) an

Page 5: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 237

se, anytofandetric

hesee [3].

of ap

x

ified in

Fig. 3. Nine-petal flowers.

(c) for sample triples, the latter having a vertex at the ideal boundary. As in the euclidean catriple of labelsx, y, z ∈ (0,∞] determines a geodesic triangleT in the hyperbolic plane, unique uprigid motions (i.e., Möbius transformations ofD), and it determines an angleα(x;y, z) at the center othe circle of radiusx. The formula forα, to be given later, involves now the hyperbolic cosine lawmust accommodate infinite radii. The angle sumθ(·;R) is defined as before and has the same geomimplications.

Now for the result which motivates our computational effort:

Definition 1.1. Given a complexK , a labelR is said to satisfy thepacking conditionat an interior vertexv ∈ R if θ(v;R)= 2πn for some integern� 1. The labelR is said to be apacking labelif the packingcondition is satisfied at every interior vertex.

The next theorem says that under our assumption thatK triangulates a closed topological disc, tlocal compatibility conditions are enough to ensure a circle packing. For the proof of the theorem(In more general multiply-connected cases, global compatibility conditions also enter.)

Theorem 1.2. Given a labeled complexK(R), a necessary and sufficient condition for existencecircle packingP with P ↔K(R) is thatR be a packing label. In this case,P is uniquely determined uto rigid motions(isometries) of the euclidean or hyperbolic plane, as appropriate.

The angle sum mapθ is nonnegative (positive in the euclidean case) and its value at a vertev isbounded byπ deg(v). If v is interior,θ(v;R)= 2πn, andn� 2, then the label is said to have abranchpoint of ordern− 1 atv; a packing label with one or more branch points is called abranchedpackinglabel. In computing packing labels, the branch structure (branch points and their orders) is specadvance.

Definition 1.3. Given the complexK , an angle sumtarget functionA assigns to each interior vertexva valueA(v)= 2πn, wheren− 1 is the desiredorder of branching at vertexv. Thedefault target is nobranching,n≡ 1.

Page 6: A circle packing algorithm

238 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

References to the target angle sums will generally be suppressed until they arise in actualcomputations. Dubejko [12] has established the following necessary and sufficient conditions forA:The functionA can be the target function for a circle packing ofK if and only if, for any simple closed

hes the

ce and

let

h

roof

ed withlution

edge-pathγ in K ,∑v∈γ ◦

(A(v)− 2π)� (k − 3)π

where the sum is over verticesv interior to γ andk is the number of edges inγ . We assume hencefortthatA satisfies these (purely combinatorial) conditions. Nothing will be lost if the reader assumdefault target, which is always legal.

The packings we intend to compute are guaranteed by the following fundamental existenuniqueness result:

Theorem 1.4 (The Dirichlet Problem).LetK be a complex triangulating a closed topological disc,A be an angle sum target function ofK , and assume thatg : ∂K(0) → (0,∞) (respectively(0,∞]) isa function defined on the boundary vertices ofK . Then there exists a unique euclidean(respectivelyhyperbolic) packing labelR for K with the property thatR(wj)= g(wj) for each boundary vertexwj .

More explicitly, the solutionR satisfies the following nonlinear system ofN equations, one for eacinterior vertexuj .{ ∑

〈uj ,v,w〉α(R(uj );R(v),R(w)

) =A(uj): j = 1, . . . ,N

}.

We say that the solution labelR “solves the Dirichlet problem”, since the theorem statement and pboth parallel the classical Dirichlet problem for harmonic functions.

2. Local geometry

Circles have been objects of study for well over two thousand years. The dynamics associatsmall configurations of circles—triples and flowers—underly both the theoretical and practical soof the Dirichlet problem. We refer to these lemmas collectively as “monotonicity” results.

Lemma 2.1. Let x, y, z denote euclidean or hyperbolic radii in the configurations of Fig.2. The anglesα,β, andγ and Area(T ) are differentiable functions ofx for 0< x <∞. Moreover,

(a) α is decreasing inx,(b) β andγ are increasing inx,(c) Area(T ) is increasing inx,(d) limx→0α(x;y, z)= π , and(e) limx→∞ α(x;y, z)= 0.

Monotonicity is strict(except for the hyperbolic case of(b) wheny (respectivelyz) is infinite).

Page 7: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 239

Lemma 2.2. LetFv = {v;v1, . . . , vk} denote a closed flower,{r; r1, . . . , rk} the corresponding euclideanor hyperbolic labels, andθ(r; r1, . . . , rk) the angle sum forv. Thenθ is a differentiable function of its(finite) labels. Moreover,

the nextduces a

pper”

e

ectnds

msean.)

is suchlations.

(a) θ is strictly decreasing inr ,(b) θ is strictly increasing inrj , j = 1, . . . , k,(c) limr→0 θ = kπ , and(d) limr→∞ θ = 0.

In particular, givena with 0< a < kπ , there exists a unique labelr = r0 so thatθ(r0; r1, . . . , rk)= a.

The previous results are standard in the circle packing literature (see [3]) and as we see insection, suggest the numerical approach to solving the Dirichlet problem. Later, Lemma 3.1 intronew, more subtle monotonicity, which largely accounts for the efficiency of our implementation.

3. The packing algorithm

3.1. The Perron method

The basis for packing algorithms lies with the Perron method; we describe the hyperbolic, “uversion of Bowers [5]. We will say that a labelR for K is asuperpacking labelfor the boundary valueproblem in Theorem 1.4 if two conditions hold: (1)R(w)� g(w) for every boundary vertexw, and (2)θ(v;R)� A(v), the target angle sum, for every interior vertexv. Together, these imply that the labelRis too large.

The collectionΦ ⊂ R of all superpacking labels forms what is known as aPerron family. In particular,Φ is nonempty, since in hyperbolic geometry a labelR0 satisfying (1) and having sufficiently larginterior labels will have small interior angle sums. By monotonicity,R1,R2 ∈ Φ ⇒ min{R1,R2} ∈ Φ.This suggests consideration ofR = infΦ{R}. If R is nonvanishing, continuity of angle sums with respto their labels easily implies thatR will lie in Φ. Monotonicity tells us that it must be a solution aelementary hyperbolic area computations give uniqueness. The argument thatR does not vanish requirea little more work, using hyperbolic areas, the Gauss–Bonet Theorem, the Euler characteristic ofK , andthe necessary conditions on the target functionA. (The solution of euclidean boundary value problemay be inferred from the hyperbolic case because hyperbolic quantities are infinitesimally euclid

3.2. The Uniform Neighbor Model (UNM)

One could implement the Perron method numerically. In fact, however, the geometric stabilitythat more direct relaxation methods suffice. We now describe the basic model we use in our calcu

Focusing on the flower forv, we treat the labelr as a variable, and the petal labelsr1, . . . , rk as fixedparameters. For a given valuer = r0, the associated “reference” label is the numberr for which thefollowing equality holds:

θ(r0; r1, . . . , rk)= θ(r0;k︷ ︸︸ ︷

r , . . . , r)=: θ (r0; r). (3.1)

Page 8: A circle packing algorithm

240 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

In other words, laying out a flower with petal circles of the uniform radiusr would yield the same anglesum as with the original petal radiir1, . . . , rk when the center circle has radiusr0.

hejustthat the.flowernd theollows

djusting

terestedof

rs

Lemma 3.1. Let θ(r) = θ(r; r1, . . . , rk) and θ (r)= θ (r; r)= θ(r; r , . . . , r), as above, withr chosen sothat θ(r0)= θ (r0) for somer0> 0. Assuming the labelsr1, . . . , rk are not all equal, then

dr(r0) <

dr(r0), (3.2)

Moreover,θ(r) < θ(r) for 0< r < r0 andθ(r) > θ(r) for r > r0.

Proof. The last inequalities follow easily from (3.2), sinceθ andθ intersect at the reference labelr0 bydefinition.

The proof of (3.2) is complicated first by the presence ofk parameters, but more subtly by tdependence ofθ on r1, . . . , rk through r , which is suppressed in the notation. Our strategy is to adthe petal labels in pairs, moving the largest and smallest towards one another in such a wayreference labelr does not change, and watching the derivative ofθ . We work in the euclidean settingCircles in the Poincarè disc model of the hyperbolic plane are also euclidean circles; a hyperbolicwith central circle at the origin is simultaneously a euclidean flower with the same angle sum, aeuclidean radii are monotone increasing in hyperbolic radii. In other words, the hyperbolic result ffrom the euclidean.

Suppose thatS < L, whereS denotes the smallest of the petal labelsr1, . . . , rk while L denotes thelargest. By monotonicityS < r < L. Fixing all remaining petal labels,θ is a function ofL and S,θ = θ(r;L,S). The condition thatr remain fixed is expressed by

θ(r0,L,S)= θ (r0), (3.3)

and this definesS as a function ofL by the implicit function theorem. The slope ofθ at r0 becomes afunction ofL, and we will show that it is increasing; that is,

∂2θ

∂r∂L(r0,L,S) > 0. (3.4)

This means, of course, that decreasingL towardsr (and hence increasingS towardsr) makes the slopeof θ smaller (i.e., more negative). Strict inequality in (3.4) means that the currentL andS may be adjusteduntil a new pair of parameters qualifies as largest and smallest, at which point one can shift to athem in turn. It is an easy argument to show that (3.2) follows.

The verification of (3.4) is rather messy; we sketch the euclidean case and leave details to the inreader. Since we adjust onlyL andS, we need only consider the contributions to the full angle sumeither three or four of the faces in the flower. Suppose, for instance, thatx, y are the labels of the neighboof L andz,w are the labels of the neighbors ofS. Eq. (3.3) reduces (see (1.1)) to

α(r0;L,x)+ α(r0;L,y)+ α(r0;S,w)+ α(r0;S, z)= constant. (3.5)

For notational convenience define the mixed partial derivative

α1,2(x, y, z)= ∂2α(x;y, z)∂x∂y

. (3.6)

Page 9: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 241

Inequality (3.4) is equivalent to

α1,2(r0,L, x)+ α1,2(r0,L, y)+ α1,2(r0, S,w)dS

dL+ α1,2(r0, S, z)

dS

dL> 0. (3.7)

putationtify a

s, to a

becomen of

s is

so well

The computations are messy, but the results are all rational expressions; Eq. (3.5) permits comof dS

dL . After simplification, reorganization, and cancellation of clearly positive factors, one can idenrecurring subexpression in the left side of (3.7). In particular, define the auxiliary functions

f (r, a, b) := (a − r)(a + b)− 2r2

(r + a)(r + a + b) and F(r, a, b, c, d) := f (r, a, b)− f (r, d, c).A simple calculation confirms the following fact:

If a > d > 0, r > 0, andb, c ∈ [d, a], thenF(r, a, b, c, d) > 0. (3.8)

Inequality (3.7) is equivalent, after further simplification and judicious pairing of subexpressionlinear combination with nonnegative coefficients of the following four expressions:

F(r0,L, y,w,S), F (r0,L, y, z, S), F (r0,L, x,w,S), F (r0,L, x, z, S).

The positivity of (3.8) implies inequality (3.7).There are two other situations. IfL andS share a common neighbor, then simply takey = w (and/or

x = z) in the above. On the other hand, ifL andS are themselves neighbors, sayx,L,S, z is the order ofpetals, then the expressions in (3.5) and (3.7) must be adjusted accordingly. The simplificationsslightly more involved, but the subexpressionf recurs and the result is a nonnegative combinatiothese four expressions,

F(r0,L, x,L,S), F (r0,L, x, z, S), F (r0,L,S,L,S), F (r0,L,S, z, S).

Positivity again follows from (3.8). This covers all possibilities and completes the proof.✷See Fig. 4 for a plot ofθ andθ as functions ofr for a sample 6-flower.

3.3. The numerical algorithm

Using the Uniform Neighbor Model, our basic algorithm generates a sequence of labels{Rj} asfollows:

1. Pick any initial labelR0, only requiring thatR(w)= g(w) for everyw ∈ ∂K .2. Given a labelRn, cycle through the list of interior vertices.3. Given an interior vertexv, adjustRn(v) using the UNM by choosingRn(v) so thatθ

(Rn(v)

) =A(v).4. Denote the adjusted label byRn+1; return to (2) until a prescribed accuracy in the angle sum

achieved.

Geometric facts about angle “flow” explain why this sequence of corrected labels convergesto the packing label. Consider the euclidean setting. For labelR, define “excess”e at an interior vertexvand the “total error”E by

e(v)= θ(v;R)−A(v), E =E(R)=∑

v interior

|e(v)|.

Page 10: A circle packing algorithm

242 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

yity;forhe

x

ade.1lished.lent; this.)

le thatatoricsl

Fig. 4. Angle sums of the original and reference flowers.

Claim. E is monotone decreasing with our label corrections.

Let F denote the number of faces ofK. Each has three angles which sum toπ ; reorganizing these bvertex, thetotal angleis

∑v∈K θ(v;R)= Fπ, independentofR. Thus total angle is a conserved quant

any adjustment of a label simply causes aredistributionof that angle among the vertices. Suppose,instance, thatθ(v;R) is too large at some interiorv, soe(v) > 0; by Lemma 2.2 one can increase tlabel R(v) until e(v) = 0. The excess angle atv is pushed to its immediate neighbors. At worst,Eremains unchanged. However, ifu ∼ v is an interior with angle sum toosmall or is a boundary verte(whose angle sum doesn’t count inE), then the correction toR(v) simultaneouslyreduces|e(v)| and|e(u)|, andE decreases. Similar arguments apply whene(v) < 0. In any case, as long as the change mto R(v) does not cause the angle sum atv to overshootA(v), E cannot increase. Since by Lemma 3corrections obtained from the UNM are conservative—they do not overshoot—the Claim is estabConsiderations are slightly altered in the hyperbolic setting because area and angle are equivaactually tends to improve the performance of the algorithm. (See [32] for the hyperbolic dynamics

Observations. The geometry of circle configurations makes the adjustment process so stabalmost any iterative procedure will succeed. This is tempered by the essentially arbitrary combinpermitted inK ; the local geometry is variable and there is almost noa priori information on the globasolution. Here are some observations regarding implementation:

Page 11: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 243

• The process is insensitive to the initial label: one can generally set its values (for interior vertices)arbitrarily.

• There is no advantage in careful local computation, since results will be made obsolete by subsequent

lation,

ed

t to

ing the

eover,ment),

ngl

t

adjustments.• The process is insensitive to the order in which local adjustments are made.• Combinatorial variability (variable degrees, lack of symmetry, etc.) complicates data manipu

storage, and vectorization.

4. Details of the implementation

Given complexK , boundary functiong, and angle sum targetA, our task is to compute the associatpacking labelR, as guaranteed by Theorem 1.4. Index the vertices ofK by {w1, . . . ,wM;u1, . . . , uN },with wi denoting boundary vertices andui , interior vertices. The label entries which are subjecadjustment will be termedfree; for the Dirichlet problem, these are theN interior labels.

Problem. Find values{r1, . . . , rN } so that the label vectorR satisfies the systemG(R) = 0, whereR = {g(w1), . . . , g(wM); r1, . . . , rN } and{

Gj(R)= θ(uj ;R)−A(uj ), j = 1, . . . ,N}. (4.1)

Some abuse of notation and label transformations will be highly advantageous in describalgorithm.

Notational convention. The same letter to be used to denote both a vertex and its current label. Morin hyperbolic geometry we use transformed labels; in all calculations (and without further comeach hyperbolic labelh ∈ (0,∞] will be replaced by the more convenient labels = exp{−2h} ∈ [0,1).

Keeping these conventions in mind, the angle calculation associated with vertexv for face〈v,u,w〉(1.1) can be rewritten in a more efficient form as

Euclidean: α(v;u,w)= 2sin−1

(√u

v+ u · w

v+w), (4.2)

Hyperbolic: α(v;u,w)= 2sin−1

(√v · 1− u

1− vu · 1−w1− vw

). (4.3)

In computing the angle sumθ(v;R), only the labels forv and its petals are involved, so all our packicomputations are “local”. We will writeθ(v;R)= θ(v; {vj }), where{vj } is shorthand for the list of petalabels. The context should make our index usage clear.

4.1. Uniform neighbor calculation

Using the UNM requires two steps. First, given a value forv, determinev so thatθ (v; v)= θ(v; {vj }).Second, solve for a new value forv (call it u) so thatθ (u; v)=A(v). The advantage of the UNM is thathese equations can be solved explicitly as follows.

Page 12: A circle packing algorithm

244 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

Let θ = θ(v; {vj }) andA = A(v). From these values, computeβ = sin( θ2k ) andδ = sin( A2k ). For the

euclidean case, we haveθ(v)= kα(v, v, v)= θ . Using the formula forα (4.2), we getv = β

1−β v. Then,ˆ 1−δ

similar

r

ill effectshow,

local

uch

e, the

solving θ = A, we getu =δv. Note that since 0� θ < kπ then 0� β < 1 and so sincev > 0 then

u > 0.For the hyperbolic case, the computations are slightly more complicated but proceed in a

fashion. We getv = β−√v

βv−√v. If v < 0 we takev = 0. Also 1− v = β(1−v)√

v (1−β√v)

, thus sinceβ < 1 andv < 1,

v < 1. We computeu from u= t2 where

t = 2δ√(1− v)2 + 4δ2v+ (1− v) .

It is clear thatt > 0. To see thatt < 1, start withδ < 1 to get(1− v)2 + 4δ2< (2δ− (1− v))2. Thus

t <2δ

|2δ − (1− v)| + (1− v) .

If 2δ > (1− v) this last equation reduces tot < 2δ2δ = 1. If, on the other hand, 2δ < 1− v, then it reduces

to

t <2δ

2(1− v)− 2δ<

4δ − 2δ= 1.

In any event, in the hyperbolic case 0< u< 1, as desired.Let this process, in either geometry, be represented byu =M(v, {vj },A). Then one iteration of ou

algorithm loops through theN free labels and updates them by

ui =M(ui, {uj },A(ui)

), i = 1, . . . ,N.

Note that since the values of adjacent labels may change during the iteration, later updates wthe angle sums for prior circles—one expects this to be an iterative process. As we will soonthis algorithm is locally linearly convergent. We will improve convergence overall by using thisconvergence to create heuristics for global over-relaxation procedures (see Section 4.3).

4.2. Local linear convergence

Given petal labels{vj }, letv denote the quantity of real interest; namely, the solution ofθ(r; {vj })=A.Lemma 3.1 implies that the computed valueu lies between the current valuev andv:

v � u� v or v � u� v.Thus, replacing labelv by u is always a conservative improvement. We would like to see how mbetteru= u(v) is thanv, so we look at the ratio

u(v)− vv− v .

In particular we are interested in the maximum value of this ratio over the admissible range forv andalso the value asv approachesv. From some simple calculations, we see that for the euclidean casmaximum occurs atv = 0, and for the hyperbolic case, atv = 1 (hyperbolic radius= 0).

Page 13: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 245

To understand the behavior of this ratio in the euclidean case, we need some information about theangle sum function. Considerθ as a function ofv alone, with petal labels{vj } as fixed parameters. Then,for v near 0, we have

ximumthe

s section

for

e

θ(v)≈ kπ − 2√v S, whereS =

k∑j=1

√1

vj+ 1

vj+1.

Also, θ ′(v)≈ − 1√vS. Next,

limv→0

u(v)= 1− δδ

limv→0

βv

1− β = − 1− δδ

limv→0

1dβdv

using L’Hôpital’s rule (sinceβv=0 = 1). To evaluate this, we have

dv= 1

2kcos

2k

)θ ′(v).

Thus forv near 0, we have

dv≈ − 1

2k· 1

k

√v S · 1√

vS = − S2

2k2⇒ lim

v→0u(v)= 1− δ

δ

2k2

S2= u0.

And thus we have

supv>0

u(v)− vv− v = lim

v→0+u(v)− vv − v = 1− u0

v< 1.

This follows from the above calculations and the fact that 0<u0< v.For the hyperbolic case, the results are similar in that there is an explicit expression for the ma

of this ratio in terms of{vj } and v and it is clearly less than 1. These results show that locallyconvergence is at worst linear.

4.3. Acceleration and final algorithm

Let R be the exact solution and letRl and Rl+1 be consecutive approximations. For largelcomputational experiments have shown that the local linear convergence discussed in the previouis uniform, i.e.

Rl+1 − R ≈ λ(Rl − R),holds element-by-element for someλ < 1. Assuming this result holds exactly, we get two heuristicsaccelerating the convergence of this process. Taking this result forl andl+ 1, we can solve forRl+2 andR to get

Rl+2 =Rl+1 + λ(Rl+1 −Rl) (4.4)

and

R =Rl+1 + λ

1− λ(Rl+1 −Rl). (4.5)

When we use the equation forRl+2 (4.4) to replaceRl+1 we call itsimpleacceleration. When we use thformula forR (4.5) to replaceRl+1 we call it superacceleration.

Page 14: A circle packing algorithm

246 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

Table 1Circle packing algorithm

Given:

gthe ratio

rder to

at weuickly asPacking

erical

ancestepping

• complexK• boundary functiong• legal target functionA• initial labelR• tolerancesε > 0 andδ > 0.

Algorithm:1. Set the boundary labels ofR to theirg values.2. Initialize:c= ε+ 1, λ= −1, flag= 03. While (c > ε) do

(a) c0 = c, λ0 = λ, flag0 = flag, R0 = R(b) For each free nodeuj

i. Calculate the angle sumθjii. Updateuj =M(uj , {ui },Aj )iii. Accumulate error estimatec= c+ (θj −Aj)2

(c) c = √c, λ= c/c0, flag= 1

(d) If (flag0 = 1) andλ < 1 thenperform super accelerationi. c= λc

ii. If |λ− λ0|< δ thenλ= λ/(1− λ)iii. Determine largestλ∗ s.t.R+ λ∗(R −R0) in rangeiv. λ= min(λ,0.5λ∗)v. R = R + λ(R −R0)

vi. flag= 0

To use these acceleration schemes we need an estimate of the error reduction factorλ. In practice, weuse a ratio of valuescl+1/cl wherecl is an approximation of‖G(Rl)‖2. In addition, since we are usinan estimate, we choose between the two different acceleration steps based on whether or notcl+1/cl is converging to a constant value. We also modify the size of the acceleration factor in oassure that the new value is in a valid range for radius labels (vi > 0 for euclidean and 0< vi < 1 forhyperbolic). For this, we determine the largestλM for which all components of

Rl+1 + λM(Rl+1 −Rl)remain valid. We use12λM as an upper bound for the acceleration factor. Thus we are assured thalways stay in the proper range and when the situation presents itself, the iterates converge as qpossible. These modifications for acceleration and other features are incorporated into the CircleAlgorithm given in Table 1.

4.4. Results

Having considered certain theoretical properties of our algorithm, let us examine some numresults.

Acceleration. First, consider the effect of using the acceleration. In Table 2 we show the performfor sample runs with no acceleration, simple acceleration, and super-step acceleration. (Super-

Page 15: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 247

Table 2Tests of acceleration

Data file eucl/hyp N Acceleration Iters Flops Error

umberr of the

fore, weich

In the

st

mber ofr

hterior

berfactor

on the

amerange

on theoperty.

spiral78 eucl 50 none 16 48,040 2.8549E−5spiral78 eucl 50 simple 14 43,590 2.4398E−5spiral78 eucl 50 super 12 37,370 2.7130E−5data237 eucl 223 none 297 3,924,600 4.6165E−5data237 eucl 223 simple 199 2,740,200 4.5294E−5data237 eucl 223 super 46 632,900 2.8921E−5data237 hyp 223 none 220 4,919,200 4.4722E−5data237 hyp 223 simple 147 3,377,400 4.5010E−5data237 hyp 223 super 36 808,700 3.2906E−5

occurs if the tests for step 3(d)(ii) in the meta-code given in the box are satisfied.) We report the nof iterations, the flop count (an estimate of the number of floating point operations), and the errofinal value. The error is computed as‖G(R)‖1

3N ,G as defined in (4.1).

Size. The data suggest a clear advantage using acceleration, one which grows with size. Therenext look at how the algorithm performs asN increases. We used a simple family of complexes whare built by spiraling out from the center point to include the desired number of interior circles.hyperbolic runs, we set the boundary labels to infinity and started the interior labels with small (< 0.1)values. Fig. 5 is a graph of the asymptotic error reduction factorλ (without acceleration) plotted againthe number of interior verticesN . This curve is approximatelyλ= N

N+C , for C ≈ 30. Thus for largeNthe basic iteration converges slowly. However, with this same setup, we have compared the nuiterations needed to reach a tolerance of 10−8 using only the simple accelerationversususing the supeacceleration.

Ordering. To test the effect of the order in which free vertices{uj } are adjusted, we ran trials wita fixed hexagonal complex with 100 interior vertices. We set boundary labels to 2 and initial inlabels to 1; in the exact solution, all labels are 2. We randomized the indexing, recorded the numI ofiterations it took to converge, noted the final error, and computed the approximate convergenceλby λI = (Error). In 41 random trialsλ ranged from 0.5462 to 0.6094, I from 18 to 21. This was alimited test, but is in line with our experience that the ordering of vertices has a limited impactcomputations.

Initial label. To test the effects of the initial label on performance, we ran trials with the scomplex, but in the hyperbolic setting. Boundary labels were random but fixed, ending up in the[0.68,0.86]. Table 3 summarizes the results for various initial values for the interior labels.λ is theeffective convergence rate, computed so that(Starting Error)(λ)I = (Final Error), whereI is the numberof iterations. (HereU(a, b) indicates uniformly random variables in the ranges(a, b) andR is the exactsolution.) Note that even though the local method is conservative (i.e., always produces valuessame side of the correct answer as this initial guess), the super-step acceleration corrupts this pr

Page 16: A circle packing algorithm

248 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

lexes,ationally

dr, and

Fig. 5. Experimental estimates ofλ.

Table 3Effects of starting labels

Initialization Iters Starting error Final error λ

U(0,1) 35 39.601 1.7274E−6 0.6162U(0,0.5) 32 43.520 6.8814E−7 0.5705U(0.5,1) 35 27.540 1.6074E−6 0.6213≈ R 35 8.4378 1.2559E−6 0.6381>R 29 5.9513 2.5086E−6 0.6028<R 31 4.3359 1.6615E−6 0.62090.86 34 10.094 2.1669E−6 0.63660.68 31 5.9867 2.6891E−6 0.6241

5. General packing problems

We have described our algorithm for the simplest Dirichlet problem on simply connected compbut it applies much more broadly. Here we discuss more general settings, open questions, computintensive applications, and software.

Combinatorics. In fact, the only requirement on the complexK is that it triangulate an orientetopological surface. Thus, it may be finite or infinite, with or without boundary, planar or nonplana

Page 17: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 249

for

veral

gximal

ed

is an

usly) to

esultque.

Fig. 6. Effects of acceleration.

simply or multiply-connected—we are guaranteed that there exists one or more circle packingsK .Paraphrasing the central existence result (see [2]):

Fact. GivenK , there exists a Riemann surfaceS and a univalent circle packingPK in S with thecombinatorics ofK ; S andPK are unique up to conformal isometries.

The packingPK satisfies certain extremal conditions and is called themaximal packingfor K .Note thatK “chooses” the geometry in which its maximal packing must live. Fig. 7 illustrates seexamples. In computational terms:

(a) WhenK is a closed topological disc, the maximal packing lies inD and is computed by solvinthe Dirichlet problem (Theorem 1.4) with infinite boundary labels (and default target). The mapacking for the complex of Fig. 1(a) is shown in Fig. 7(a).

(b) WhenK is the Riemann sphere,S2 (the unit sphere inR3), then one vertex is removed, the reduccomplex is packed inD as in (a), the missing vertex is identified with the exterior ofD, and the resultsare projected back toS2, where a normalizing Möbius transformation may be applied. Fig. 7(b)example with combinatorics dual to Buchminsterfullerene.

(c) SupposeK triangulates a compact surface (hence is finite with no boundary) of positive geng.Starting with any initial label, our algorithm generates labels converging (generally, quite rapida maximal packing label. Wheng = 1, the computations are necessarily euclidean and the ris unique up to scaling; wheng > 1 the computations are hyperbolic and the result is uni

Page 18: A circle packing algorithm

250 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

cations.

ted bylexes

ng

Fig. 7. Maximal packings.

A fundamental domain for a covering of the packing can be displayed inC or D, respectively.Fig. 7(c) is a 1-torus and Fig. 7(d) is a 2-torus; edges have been marked to show edge identifi

(d) SupposeK is infinite and simply connected. EitherK is parabolic, meaningPK packs C, aswith the hexagonal “penny” packing of Fig. 7(e), orK is hyperbolic, meaningPK packs D,as with the constant 7-degree packing of Fig. 7(f). Computationally, these are approximaappropriately normalized solutions of Dirichlet problems for finite, simply connected sub-compexhaustingK . When given a nonsimply connectedK , one works instead with its universal covericomplexK , which is infinite and simply connected.

Page 19: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 251

Geometry. An important feature of circle packing is that thecombinatoricsof K largely determinethegeometryin which its packings live. The fundamental dichotomy expressed in (d) above provides astriking example, since it can be shown that aparabolic complex has no packing inD (the Discrete

riateiversaletricthe

ndaryBonet,ackinggiven

Tightbeenimply

llustratespecified

rstoncial

e,ers

orithmuniform

door tolaps uplly toirs ofo

Liouville Theorem, [15]). WhenK is multiply connected, the topology determines the appropgeometry; namely, the intrinsic spherical, euclidean, or hyperbolic metric inherited from the uncovering surface. (Note in particular that all numerical computations involve the familiar mquantities.) Thus, in (c) above, if genus(K) = 1, then the appropriate geometry is euclidean—hyperbolic packing algorithm will diverge to zero. Conversely, when genus(K) > 1, hyperbolic geometryapplies and the euclidean packing algorithm will fail.

The only influence one has on the geometry of a circle packing is through choice of bouconditions (if there is a boundary) and through branching, which is tightly mediated by Gauss–Riemann–Hurwitz, Euler characteristic, and other classical relations. In our experience, the palgorithm always degenerates if the geometry being used is theoretically incompatible with thecomplexK or with the boundary and branching conditions prescribed forK .

Boundary angle sums.Boundary angle sums can be specified in place of boundary labels.compatibility conditions (involving geometry, combinatorics, and branching) have not yetformulated, but our packing algorithm appears to work without change for legal prescriptions—sset boundary angle sum targets, declare boundary labels as free, and run the algorithm. Fig. 8(a) ia mixed problem: some boundary vertices were given specified labels, while others were given sangle sum targets.

Overlap packings. The fundamental existence result for circle packings (see the Andreev–ThuTheorem of [26]) actually applies tooverlapping packings, of which our tangency patterns are a specase. One is allowed to specify an overlap angleφ(u, v) ∈ [0, π/2] for each edge〈u, v〉 of K ; in theassociated packingP , the circlescu andcv will overlap (i.e., intersect) with angleφ(u, v) (φ(u, v)= 0means tangency).

Our algorithm requires only an adjustment in the computation ofα. To illustrate in the euclidean cassuppose triangleT has labelsx, y, z and overlapsφx,φy,φz (for opposite edges). Defining parametηx, ηy, ηz ∈ [0,1], whereη· = cos(φ·), formula (1.1) becomes

α(v;u,w,ηv, ηu, ηw)= arccos

((x2 + y2 + 2xyηz)+ (x2 + z2 + 2xzηy)− (y2 + z2 + 2yzηx)

2√x2 + y2 + 2xyηz

√x2 + z2 + 2xzηy

). (5.1)

The monotonicity results of Section 2 continue to hold (see, e.g., [36]), so Thurston’s iterative algyields packing labels as in the tangency case. In fact, the process is sufficiently robust that theneighbor model works despite the fact that it is no longer strictly applicable.

Yet more general overlap situations are of theoretical and practical interest, but open theincompatibilities. See [20] for the most general existence and uniqueness statement for overto angleπ . In another direction, “imaginary” values for overlap angles correspond geometricainversive distances, a classical, conformally invariant way to measure the “distance” between paseparated circles. The continuum of situations—from overlaps of angleπ/2, through tangency, out tinversive distances approaching infinity—is accommodated in formula (5.1) by letting theη-parameters

Page 20: A circle packing algorithm

252 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

itionsnstant

egs, butls that

ors’gs arece and

simple

kingristoffel.formal

ese areientists;other

ph can be

Fig. 8. Mixed boundary value, overlap, and inversive distance examples.

vary over[0,∞). The four packings of Fig. 8 satisfy the same mixed boundary label/angle sum condbut show a variety of “overlap” prescriptions. Fig. 8(a) is the familiar tangency case; Fig. 8(b) has coinversive distances, allη set to 2.0; Fig. 8(c) has all overlaps set toπ/3; and Fig. 8(d) involves a mixturof overlaps and inversive distances. There is yet little theoretical work on inversive distance packinour algorithm handled these without complaint. Improper specifications tend to show up in labedegenerate during repacking.

Spherical geometry. The sphere is the most rigid and difficult classical setting. To the authknowledge, no packing algorithm intrinsic to the geometry has been found; spherical packintypically obtained by stereographically projecting from the disc. However, fundamental existenuniqueness results for branched packings (i.e., discrete rational functions, see [8]) and evenDirichlet problems cannot be handled by projection and remain open.

Applications. In the numerical conformal mapping of plane regions, it is unlikely that circle paccan ever compete in speed or accuracy with classical numerical methods such as Schwarz–ChHowever, circle packing techniques are finding new applications in a number of more general consituations; see the survey [33]. We illustrate three for which no other methods are known. Thcomputationally intensive and happen to be of interest to mathematicians, physicists, and neuroscthey provided much of the motivation for our algorithm improvements. We do not mentionpotentially valuable applications, such as graph embedding.

Tilings. Fig. 9(a) approximates a (finite piece of) a “conformal” tiling ofC. In this theory, the tileshapes are determined purely by the abstract adjacency graph of the global pattern. Such a gra

Page 21: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 253

; ato Bowers

ndeed,loyd,

raics and

Fig. 9. A sample conformal tiling.

augmented to give a complexK which is then circle packed to provide approximations of the tilingrefinement process and associated packings lead to more accurate shapes. We refer the readerand Stephenson [6] for details. The circle pattern underlying the tiling is Fig. 9(b). This example (ithis whole topic) was motivated by work of Cannon, Floyd and Parry; see [22]. Our thanks to Bill Fwhose software created the underlying complex as input for our packing routine.

Dessins. In the theory ofdessins d’enfantsof Grothendieck, drawings on surfaces lead to algebnumber fieldsvia triangulations and associated conformal structures (see [30]). In [6], Bower

Page 22: A circle packing algorithm

254 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

imations. 10 is ass. Eachecomestial for

s forciencerum, aree neededon andreservesfMRI,gulatedaps ofks to the

flat mapsles; theere.

Fig. 10. A stage-3, genus 2 dessin.

Stephenson develop circle packings techniques to provide both discrete parallels and approxto these conformal structures. Fig. 7(d) comes from a genus 2 dessin at a “coarse” stage. Figmore accurate stage-3 refinement for the same dessin obtained with a “hex” refinement procerefinement stage roughly triples the number of vertices, so the ability to handle large packings bimportant quickly. In this setting of triangulated surfaces, particularly, there appears to be a potensignificant vectorization and parallelization of our algorithm.

Brain-mapping. A use for circle packings which is just emerging and placing new demandspeed and flexibility concerns the “flattening” of images of the human brain for use in neurosresearch. The cortical surfaces of the brain, the cerebellum and the hemispheres of the cerebessentially highly convoluted topological 2-spheres embedded in 3-space. Flat representations arin structural and functional studies of the cortex for purposes such as registration, visualizatistatistical data collection; conformal flattening is emerging as the preferred method because it pvaluable geometric information. Various medical imaging technologies, such as PET, MRI andprovide 3-dimensional representations from which the cortical surfaces can be extracted as triantopological spheres or discs. Circle packing is then a means for approximating the conformal mthese surfaces and manipulating the resulting images. See [21] and references therein; our thanauthors for the examples shown in Figs. 11 and 12. These are grayscale images of color codedin the hyperbolic and spherical settings. These circle packings each involve roughly 50,000 circspherical packing is computed in hyperbolic geometry and projected stereographically to the sph

Page 23: A circle packing algorithm

C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256 255

layichlet,

1383–

ckings,

ge Phil.

moduli,

on Math.

(1997)

s, PhD

–4103.

Fig. 11. A hyperbolic flat map. Fig. 12. A spherical flat map.

Software. Our circle packing algorithm is implemented in C in the standalone programRePackand asthe compute engine behind the second author’s graphical software packageCirclePack. The softwareis available at www.math.utk.edu/∼kens. WithCirclePack the user can create, manipulate, dispand print circle packings. Functionality is provided for all the operations we have discussed—Dirboundary angle sums, overlaps, compact complexes—plus many more.

References

[1] R. Barnard, G.B. Williams, Combinatorial excursions in moduli space, Pacific J. Math., to appear.[2] A.F. Beardon, K. Stephenson, The uniformization theorem for circle packings, Indiana Univ. Math. J. 39 (1990)

1425.[3] A.F. Beardon, K. Stephenson, The Schwarz–Pick lemma for circle packings, Illinois, J. Math. 35 (1991) 577–606.[4] I. Benjamini, O. Schramm, Harmonic functions on planar and almost planar graphs and manifolds, via circle pa

Invent. Math. 126 (1996) 565–587.[5] P.L. Bowers, The upper Perron method for labelled complexes with applications to circle packings, Proc. Cambrid

Soc. 114 (1993) 321–345.[6] P.L. Bowers, K. Stephenson, Uniformizing dessins and Belyı maps via circle packing, Preprint.[7] P.L. Bowers, K. Stephenson, Circle packings in surfaces of finite type: An in situ approach with applications to

Topology 32 (1993) 157–183.[8] P.L. Bowers, K. Stephenson, A branched Andreev–Thurston theorem for circle packings of the sphere, Proc. Lond

Soc. (3) 73 (1996) 185–215.[9] P.L. Bowers, K. Stephenson, A “regular” pentagonal tiling of the plane, Conformal Geometry and Dynamics 1

58–86.[10] R. Brooks, Circle packings and co-compact extensions of Kleinian groups, Invent. Math. 86 (1986) 461–469.[11] Y.C. de Verdière, Une principe variationnel pour les empilements de cercles, Invent. Math. 104 (1991) 655–669.[12] T. Dubejko, Branched circle packings, discrete complex polynomials, and the approximation of analytic function

thesis, University of Tennessee (advisor: Ken Stephenson), 1993.[13] T. Dubejko, Branched circle packings and discrete Blaschke products, Trans. Amer. Math. Soc. 347 (1995) 4073

Page 24: A circle packing algorithm

256 C.R. Collins, K. Stephenson / Computational Geometry 25 (2003) 233–256

[14] T. Dubejko, K. Stephenson, The branched Schwarz lemma: A classical result via circle packing, Michigan Math. J. 42(1995) 211–234.

[15] T. Dubejko, K. Stephenson, Circle packing: Experiments in discrete analytic function theory, Experimental Math. 4 (1995)

(1993)

5) 157–

–305.1998)

(1993)

ormallyAssisted

6.1–164.posium

.), The

(1987)

ol. 200,

nalysis,

e Fisico

unctionVol. 11,

iversity

: Ken

307–348.[16] Z.-X. He, B. Rodin, Convergence of circle packings of finite valence to Riemann mappings, Comm. Anal. Geom. 1

31–41.[17] Z.-X. He, O. Schramm, Inverse Riemann mapping theorem for relative circle domains, Pacific J. Math. 171 (199

165.[18] Z.-X. He, O. Schramm, On the convergence of circle packings to the Riemann map, Invent. Math. 125 (1996) 285[19] Z.-X. He, O. Schramm, Thec∞-convergence of hexagonal disk packings to the Riemann map, Acta Math. 180 (

219–245.[20] C.D. Hodgson, I. Rivin, A characterization of compact convex polyhedra in hyperbolic 3-space, Invent. Math. 111

77–111.[21] M.K. Hurdal, P.L. Bowers, K. Stephenson, D.W.L. Sumners, K. Rehm, K. Schaper, D.A. Rottenberg, Quasi-conf

flat mapping the human cerebellum, in: C. Taylor, A. Colchester (Eds.), Medical Image Computing and Computer-Intervention—MICCAI’99, Vol. 1679, Springer, Berlin, 1999, pp. 279–286.

[22] J.W. Cannon, W.J. Floyd, W. Parry, Finite subdivision rules, Conformal Geometry and Dynamics 5 (2001) 153–19[23] Koebe, Kontaktprobleme der Konformen Abbildung, Ber. Sächs. Akad. Wiss. Leipzig, Math.-Phys. Kl. 88 (1936) 14[24] G.L. Miller, W. Thurston, Separators in two and three dimensions, in: Proceedings of the 22nd Annual ACM Sym

on Theory of Computing, ACM, Baltimore, 1990, pp. 300–309.[25] B. Mohar, A polynomial time circle packing algorithm, Discrete Math. 117 (1993) 257–263.[26] W. Morgan, On Thurston’s uniformization theorem for three-dimensional manifolds, in: H. Bass, J.W. Morgan (Eds

Smith Conjecture, Academic Press, New York, 1984, pp. 37–126.[27] B. Rodin, Schwarz’s lemma for circle packings, Invent. Math. 89 (1987) 271–289.[28] B. Rodin, Schwarz’s lemma for circle packings II, J. Differential Geom. 30 (1989) 539–554.[29] B. Rodin, D. Sullivan, The convergence of circle packings to the Riemann mapping, J. Differential Geom. 26

349–360.[30] L. Schneps (Ed.), The Grothendieck Theory of Dessins d’Enfants, London Math. Soc. Lecture Note Series, V

Cambridge Univ. Press, Cambridge, 1994.[31] K. Stephenson, Circle packing and discrete analytic function theory, in: R. Kühnau (Ed.), Handbook of Complex A

Vol. 1, Elsevier, Amsterdam, to appear.[32] K. Stephenson, A probabilistic proof of Thurston’s conjecture on circle packings, Rendiconti del Seminario Mate.

di Milano LXVI (1996) 201–291.[33] K. Stephenson, Approximation of conformal structures via circle packing, in: Computational Methods and F

Theory 1997, in: N. Papamichael, S. Ruscheweyh, E.B. Saff (Eds.), Proceedings of the Third CMFT Conference,World Scientific, 1999, pp. 551–582.

[34] W. Thurston, The Geometry and Topology of 3-Manifolds, Princeton University Notes, Preprint.[35] W. Thurston, The finite Riemann mapping theorem, 1985. Invited talk, An International Symposium at Purdue Un

on the occasion of the proof of the Bieberbach conjecture, March 1985.[36] J. van Eeuwen, The discrete Schwarz–Pick lemma for overlapping circles, PAMS 121 (1994) 1087–1091.[37] G.B. Williams, Discrete conformal welding, PhD thesis, University of Tennessee, Knoxville 1999 (advisor

Stephenson).[38] G.B. Williams, Earthquakes and circle packings, J. Anal. Math. 85 (2001) 371–396.