cameron browne and paul van wamelen- spiral packing

10
This article was originally published in a journal published by Elsevier, and the attached copy is provided by Elsevier for the author’s benefit and for the benefit of the author’s institution, for non-commercial research and educational use including without limitation use in instruction at your institution, sending it to specific colleagues that you know, and providing a copy to your institution’s administrator. All other uses, reproduction and distribution, including without limitation commercial reprints, selling or licensing copies or access, or posting on open internet sites, your personal or institution’s website or repository, are prohibited. For exceptions, permission may be sought for such use through Elsevier’s permissions site at: http://www.elsevier.com/locate/permissionusematerial

Upload: gremndl

Post on 28-Nov-2014

33 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cameron Browne and Paul van Wamelen- Spiral Packing

This article was originally published in a journal published byElsevier, and the attached copy is provided by Elsevier for the

author’s benefit and for the benefit of the author’s institution, fornon-commercial research and educational use including without

limitation use in instruction at your institution, sending it to specificcolleagues that you know, and providing a copy to your institution’s

administrator.

All other uses, reproduction and distribution, including withoutlimitation commercial reprints, selling or licensing copies or access,

or posting on open internet sites, your personal or institution’swebsite or repository, are prohibited. For exceptions, permission

may be sought for such use through Elsevier’s permissions site at:

http://www.elsevier.com/locate/permissionusematerial

Page 2: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

Computers & Graphics 30 (2006) 834–842

Chaos and Graphics

Spiral packing

Cameron Brownea,�, Paul van Wamelenb

aSWiSHzone.com Pty Ltd, The Basement, 33 Ewell Street, Balmain, NSW 2041, AustraliabDepartment of Mathematics, Louisiana State University, Baton Rouge, LA 70803-4918, USA

Abstract

We present a simple method for creating artistic space-filling designs based on spiral packings. Connected spiral sets are generated by

successively branching child spirals from parent spirals, constrained to fit nearby neighbors in their environment. The underlying

geometry is discussed in detail and a number of color examples generated by the algorithm are given.

r 2006 Elsevier Ltd. All rights reserved.

Keywords: Archimedes’ spiral; Apollonian circle packing; Fractal; Art

1. Archimedes’ spiral

The Archimedean spiral is a spiral with the polarequation

r ¼ ay1=n, (1)

where r is the radial distance, y the polar angle, and n is aconstant which determines how tightly the spiral is‘‘wrapped’’ [1]. When this constant n ¼ 1, the resultingspiral is known as Archimedes’ spiral:

r ¼ ay. (2)

Archimedes’ spiral (Fig. 1, left) can be defined in cartesiancoordinates by the properties (x, y, w, y, T, o) where (x, y)is the spiral’s center, w is the width of one rotation, y is thestarting angle or phase, T is the total sweep or number ofrotations, and o is the spiral’s orientation (o ¼ �1 forclockwise and o ¼ 1 for counterclockwise). Definingfunctions

xsðtÞ ¼ xþ wt cosðyþ 2potÞ, (3)

ysðtÞ ¼ yþ wt sinðyþ 2potÞ, (4)

then the spiral is paramaterized by ðxsðtÞ; ysðtÞÞ for 0ptpT .We describe the area enclosed by the spiral’s outer 3601

sweep as its footprint (Fig. 1, right).

2. Spiral packing

We wish to pack a given area with connected sets ofArchimedes’ spiral. This will be achieved by successivelybranching child spirals from parent spirals until the targetarea is filled to some desired level of coverage (Fig. 2). Thefollowing constraints must be met:

1. Each child may have at most one parent (though parentsmay have multiple children),

2. Each child must meet its parent tangentially, and berotated such that its end point lies on the line betweenthe spiral centers,

3. A child’s width w must never exceed its parent’s width,and

4. Spirals may touch neighboring spirals tangentially butmay not intersect them.

Other potential constraints are relaxed to allow flex-ibility of design: a child may be of a greater total radiusthan its parent if Tc4Tp, a child need not be the sameorientation as its parent, and so on. Archimedes’ spiral waschosen as the most suitable form for both its aesthetic andwell-behaved mathematical qualities.The packing starts with a seed pair of opposed matching

spirals S1 and S2 (Fig. 2a) with identical w, T, o, opposedy, and tangential end points such that xs1ðTÞ ¼ xs2 ðT � 1Þ,ys1ðTÞ ¼ ys2

ðT � 1Þ, xs1ðT � 1Þ ¼ xs2ðTÞ, and ys1ðT � 1Þ ¼

xs2 ðTÞ. Fig. 2b shows a child spiral branching from a single

ARTICLE IN PRESS

www.elsevier.com/locate/cag

0097-8493/$ - see front matter r 2006 Elsevier Ltd. All rights reserved.

doi:10.1016/j.cag.2006.07.010

�Corresponding author. Tel.: +617 3371 1576.

E-mail addresses: [email protected] (C. Browne),

[email protected] (P. van Wamelen).

Page 3: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

parent. For the sake of clarity, the parent spiral is deemedto remain a complete spiral in subsequent operations eventhough part of it is clipped by the child spiral.

Next is shown a further child spiral that touches oneother spiral (Fig. 2c), and a smaller child that touches twoother spirals (Fig. 2d). This process continues within the(decreasing) target area until a packing of the desireddensity is achieved. There will be as many distinctconnected spiral sets within a packing as there are seedpairs.

There are therefore three general geometric cases toconsider, as shown in Fig. 3:

1. Case I: Child spiral S branching from existing parentspiral S1 (Fig. 3a). The child spiral is of a specified widthw, number of turns T, orientation o, and directionrelative to the parent.

2. Case II: Child spiral S of a specified width w, number ofturns T and orientation o branching from parent S1 totouch one other spiral S2 (Fig. 3b).

3. Case III: Child spiral S of a specified number of turns T

and orientation o branching from parent S1 to touchtwo other spirals S2 and S3 (Fig. 3c).

The bottom row of Fig. 3 shows the underlying geometryof these relationships. In each case, S is rotated to lietangent to S1 such that its end point T lies on the linebetween the spiral centers. The child is clipped at theintersection point U and the parent is clipped along theinterval between the tangent point V and intersection pointU. Following clipping, there should be no intersectionbetween any pair of spirals within the packing. In all cases,the parent spiral is deemed to remain complete even thoughintervals along its sweep may be clipped by children.

3. Numerical solution

We now consider the solution of case III, the mostdifficult. We will write down the equations resulting fromthe cartesian coordinates of the relevant intersections andtangential points, and discuss the solution of the resultingsystem of equations.We have the following ten variables:

1. x, y, w and y describe the spiral we are looking for, and2. ti and t0i are real numbers such that S at ti touches Si at

t0i, for i ¼ 1, 2, 3.

Each pair of touching spirals give three equations. The x-coordinates must agree and the y-coordinates must agree:

xsðtiÞ ¼ xsiðt0iÞ, (5)

ysðtiÞ ¼ xsiðt0iÞ, (6)

and the slopes of touching pairs must be equal:

qxsðtiÞ

qti

qysiðt0iÞ

qt0i¼

qxsiðt0iÞ

qt0i

qysðtiÞ

qti

. (7)

Another equation specifies that the child spiral to be fittedshould be rotated such that its end point lies on the linebetween the centers of S and S1:

sinðyÞðx1 � xÞ ¼ cosðyÞðy1 � yÞ. (8)

Note that although the child’s end point lies on the linebetween the centers, the tangent point does not necessarilydo so; it does not necessarily occur at precisely Ts�1.We therefore have ten equations with ten unknowns.

Trying to solve this set of equations algebraically isprobably a hopeless endeavor, but there are well-knowntechniques for solving such systems numerically. We willdescribe one of the simplest, Newton’s Method forSystems.We define v ¼ ðx; y;w; y; t1; t01; t2; t

02; t3; t

03Þ, a vector con-

taining all of our variables, and denote its components byv1, v2 etc. Rewriting the ten equations gives

f 1ðvÞ ¼ xsðt1Þ � xs1ðt01Þ, (9)

f 2ðvÞ ¼ ysðt1Þ � ys1ðt01Þ, (10)

f 3ðvÞ ¼qxsðt1Þ

qt1

qys1ðt01Þ

qt01�

qxs1ðt01Þ

qt01

qysðt1Þ

qt1, (11)

ARTICLE IN PRESS

(a) (b) (c) (d)

Fig. 2. Spiral packing: (a) a seed pair, (b) simple branch, (c) fitting to one other, and (d) fitting to two others.

w

(x,y) O

T

Fig. 1. Archimedes’ spiral and its footprint.

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842 835

Page 4: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

pyf 4ðvÞ ¼ xsðt2Þ � xs2ðt

02Þ, (12)

f 5ðvÞ ¼ ysðt2Þ � ys2ðt02Þ, (13)

f 6ðvÞ ¼qxsðt2Þ

qt2

qys2ðt02Þ

qt02�

qxs2 ðt02Þ

qt02

qysðt2Þ

qt2, (14)

f 7ðvÞ ¼ xsðt3Þ � xs3ðt03Þ, (15)

f 8ðvÞ ¼ ysðt3Þ � ys3ðt03Þ, (16)

f 9ðvÞ ¼qxsðt3Þ

qt3

qys3ðt03Þ

qt03�

qxs3 ðt03Þ

qt03

qysðt3Þ

qt3, (17)

f 10ðvÞ ¼ sinðyÞðx1 � xÞ � cosðyÞðy1 � yÞ. (18)

Let F ðvÞ ¼ ðf 1ðvÞ; f 2ðvÞ; . . . ; f 10ðvÞÞT be the column vector

containing our functions. We are looking for a v such thatF ðvÞ ¼ 0.

Define the 10� 10 Jacobian matrix:

JðvÞ ¼

qf 1ðvÞ

qx1

qf 1ðvÞ

qx2� � �

qf 1ðvÞ

qx10

qf 2ðvÞ

qx1

qf 2ðvÞ

qx2� � �

qf 2ðvÞ

qx10

..

. ... . .

. ...

qf 10ðvÞ

qx1

qf 10ðvÞ

qx2� � �

qf 10ðvÞ

qx10

0BBBBBB@

1CCCCCCA. (19)

Now suppose that we have as initial guess v0 for the valuesof the variables. Then we can obtain a better guess, v1, bysolving the linear set of equations Jðv0Þy ¼ �F ðv0Þ for the

column vector y and then setting v1 ¼ v0+y. It is knownthat this iteration converges quadratically to a solution forour system, provided that our initial guess is good enough.Note that the system can also be written in the form

viþ1 ¼ vi � JðviÞ�1F ðviÞ, (20)

which makes its similarity to the usual one-dimensionalNewton’s Method more apparent.The functions occurring in the Jacobian matrix are

simple enough that their derivatives can be determinedsymbolically, hence the Jacobian matrix can be precom-puted explicitly. The implementation of a method to solvethis set of equations numerically should be relativelystraightforward. The solutions of the simpler cases I andII involve similar, but simplified, applications of thisprocess.

4. Apollonian packing

We turn now to the related study of circle packing. TheGreek geometer Apollonius of Perga (3rd century BC)studied the problem of drawing a circle tangent to threeother objects, each of which may be a point, line or circle.There are a total of ten cases, the tenth being fitting a circletangent to three other circles, hence this problem is knownas Apollonius’ Tenth Problem.There are eight total solutions to this problem [1], but we

are only interested in one: the circle of minimum radius

ARTICLE IN PRESS

S1

S

P

C

T

U

V

S1

S

S 2

P

Q

C

T

U

V

W

S1

S

S

S3

2

P

Q

R

CT

U

V

W

X

(a) (b) (c)

Fig. 3. Branch geometry: (a) simple branch, (b) fitting to one other, and (c) fitting to two others.

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842836

Page 5: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

(Fig. 4, left). Note that for each touching pair of circles thetangent point lies on the line between the circles’ centers.

If the three bounding circles are mutually tangent, thenthe minimal fitted circle is called the interior Soddy circle

[1]. The three interstitial gaps formed by such a placementcan themselves be fitted with interior Soddy circles;continuing this process to a specified depth results in afractal structure called the Apollonian gasket [1], Apollo-nian fractal [2] or Apollonian packing [3,4], as shown inFig. 4 (right).

Kasner and Supnick [3] prove that the porosity of a fullApollonian packing (the ratio of vacant area to the areacovered by circles) is zero; the packing is an area-filling set.The fractal dimension of the simplest Apollonian packinghas been calculated to be 1.30568470.00001 [4].

Despite the obvious similarities between Apollonianpacking and the packing of spirals that we aim to achieve,there are also significant differences that make the case ofspiral packing more difficult. However, this comparisonprovided the impetus for an intuitive solution to the spiralpacking problem due to the second author. This solutionwas tried mostly out of curiosity but proved more thanadequate for our purposes, and is discussed in the nextsection.

5. Iterative spiral fitting

Given a parent spiral S1 and a preferred location for achild spiral S0, specified by the user with known number ofturns T and orientation o, we wish to find the child spiral S

branching from S1 as close to S0 as possible, and fitted toany potentially intersecting spirals S2, S3, etc. Thealgorithm must be robust enough to handle ambiguouschild placements by the user.

Our algorithm consists of the following steps:

1. If S0 does not intersect other spirals let S ¼ S0.

2. If S0 intersects two or more spirals, try to fit S to theclosest two without being too far from S0.

3. If 2. fails or there is only one intersecting spiral, then tryto fit a spiral with the same width as S0 to the spiral withthe greatest intersection with S0. If the resulting spiral isnot too far from S0 then use it.

4. If all else fails fit the biggest spiral in the direction of S0

to the parent.

This algorithm, explained in more detail in Listing 1,assumes that we can solve the spiral fitting Cases I, II andIII outlined in Section 2. We use the following iterativeapproximation algorithm for all three cases:

1. Approximate the spirals by circles,2. Solve the circle fitting problem, and3. Use the solution to make better circle approximations to

the spirals.

Pseudocode for this procedure is given in Listing 2.

Listing 1. Description of the general fitting algorithm.

Input: A spiral, S, indicated by the user, branching fromS_P, the parent spiral.Output: A spiral, as close to S as possible, but notintersecting any non-parent spirals.Step 1:Return an error if S has its center inside S_P.Step 2:

If S has width more than its parent, reduce the widthto that of the parent and adjust the center so that thespiral still branches in the same direction as indicatedby the user.

Step 3:If S does not intersect any non-parent spirals,return S.

Step 4:If the indicated spiral intersects 2 or more spirals dothe following: (at many points things might failbelow, if so go to Step 5)

ARTICLE IN PRESS

Fig. 4. Apollonian circle packing and the Apollonian gasket.

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842 837

Page 6: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

Step 4a:Approximate all existing spirals by discs.For each existing non-parent spiral (approximatedas a disc) determine the radius of the disc thattouches this disc and the parent disc and has itscenter on the line connecting the centers of S_Pand S. Let S_1 and S_2 be the two spirals with thesmallest such associated radius (the "boundingspirals").

Step 4b:Fit a spiral S_3 to S_1 and S_2 (branching fromS_P).

Step 4c:While S_3 intersects existing (non-parent) spirals:

Let S_4 be the spiral with the biggest intersec-tion with S_3.Let S_5 be the spiral fitted to S_1 and S_4.Let S_6 be the spiral fitted to S_2 and S_4.Select S_5 or S_6 with the smallest width and letthis be the new S_3.If this increases the width of S_3, go to Step 5.Let the new S_1, S_2 be S_1, S_4 or S_2, S_4depending on whether S_5 or S_6 was selected.Fit a spiral S_3 to S_1 and S_2.

End whileStep 4d:

If the angle from S_P’s center to S_3’s center iswithin 12.5 degrees of the angle to S’s center,return S_3.

Step 5: (Step 4 fails or just one spiral intersects S).If just one spiral intersects S, let it be denoted S_1.Otherwise let S_1 be the bounding spiral withsmallest bounding radius, as in Step 4a.Try to find a spiral S_2 with the same width as Sbranching from S_P and touching S_1.

Step 6:If S_2 does not intersects non-parent spirals, and it’sangle isn’t off (as in 4d) by more than 12.5 degrees,return S_2.

Step 7:Set S_2 ¼ S.Repeat until S_2 does not intersect any non-parentspirals:

Let S_1 be the spiral with the biggest intersectionwith S_2.Let (the new) S_2 be the spiral branching fromS_P, touching S_1 and with its center on the lineconnecting the centers of S_P and S.End repeat

Step 8:Return S_2.

Listing 2. Pseudocode for the iterative solution of Cases I,II and III.

Input: parent spiral S1 and preferred child position S0

Output: fitted child spiral S

locate the two spirals S2 and S3 closest to S0 (notincluding S1)c0 ¼ circle with center equal to S0 and unknown radiusr0do{

for (each spiral Si ¼ {1,2,3} to be fitted to){

ri ¼ radius of Si in the direction of the S

rsi ¼ radius of S in the direction of the Si

// for S1 this is the radius of S at T�1ci ¼ circle with center equal to Si and radiusri�(rsi�rso)

}solve the appropriate circle fitting problem:

Case I: Fit c0 to c1 (if no intersection)Case II: Fit c0 to c1 and c2 (if intersect S2)Case III: Fit c0 to c1, c2 and c3 (if intersect S2

and S3)D ¼ discrepancy between c0’s new and previouscentersS center ¼ c0 centerS width ¼ r0/(T�1)// radius at T�1 equals theradius of c0

} while (D4threshold)return S.

Replacing spirals by circles makes the fitting problemeasy to solve for each case. Simply take the equations forthe various circles:

ðx� cxÞ2þ ðy� cyÞ

2¼ r2, (21)

and solve the system of simultaneous equations. Thisreduces to at most a quadratic equation which canbe solved with the quadratic formula, and the best of thetwo resulting solutions picked (if necessary). The bestsolution will generally be the closest to the preferredplacement.

We cannot prove that our spiral fitting algorithm willalways converge (and in fact for very bad initial guesses itwill not) but in practice it works well. Note that if thealgorithm does converge, then it will not give the exactgeometric solution outlined in Section 3 due to theassumption that spirals touch tangentially on the lineconnecting their centers, and in general this is not the case.However, the error introduced by this assumption is on theorder of one part in one thousand and is negligible for ourpurposes.Fig. 5 shows a portion of a spiral packing gene-

rated from a single seed pair using this iterative algo-rithm. The overall effect of this design is similar innature to the Apollonian packing, however there isone major difference: every interior point within a spiralset is connected to every other. There will be as manyself-connected spiral sets in a design as there are seedpairs.

ARTICLE IN PRESSC. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842838

Page 7: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

6. Implementation

The algorithms described above form the basis of a spiraldesign editor implemented in Visual C++. There are twobasic operations:

1. Nominate a seed pair, and2. Nominate a child.

The user interactively specifies the preferred location ofeach seed pair or child using the mouse, and the programadds the correctly fitted result if possible. The preferredspiral’s degrees of freedom (width, turns, orientation andso on) are described by a master spiral template that maybe edited by the user. Similarly, any placed spiral may bedeleted or its color scheme edited.

Boundary shapes were implemented in the program assets of small, closely spaced spirals laid at regular intervalsalong the boundary path. Boundary spirals have smallwidth but a large number of turns (100) to give themreasonably constant exterior curvature and make themcircle-like in nature; this is another attractive feature ofArchimedes’ spiral. Boundary spirals participate in thefitting process but are excluded from the final output.Boundary shapes with smooth flowing curves such asspirals, teardops and Paisleys were found to give the bestresults.

Seamless tiles that replicate to fill the plane may beachieved by repeating each spiral periodically based on tilewidth, and taking ‘‘wrapped’’ spirals into account whenfitting children. Each tile will contain at least one seed pair.

When using the spiral editor, it was found that flippingorientation with each level of nesting gave best results, aschildren then generally followed their parents’ direction ofoutward flow. This can be seen in Fig. 5. When branchingchildren, it is best to branch from the spiral with widthclosest to the expected child width. Packing to the samedepth in all areas was found to give uneven coverage; amore uniform coverage is achieved by packing eachsuccessive spiral in the largest remaining gap.

This last point leads to some approaches for automatingthe spiral packing process. Given an area to be packed, twoobvious approaches are:

1. Image based: Draw the area as an image. Place a seedpair then successively grow children, removing from theimage the footprint of each new spiral. A distance mapof the image will indicate the most suitable placementfor the next spiral (the highest point within range of apotential parent), and the records of existing spirals canbe accessed to determine its exact fit. Continue until thelargest remaining image area falls below a giventhreshold.

2. Triangulation: Coarsely polygonize the boundary areaand determine its Constrained Delaunay Triangulation.Place a seed pair then successively grow children, re-triangulating with each new spiral’s center added as avertex. The largest current triangle adjacent to apotential parent will contain the preferred location forthe next spiral. Continue until the largest triangle fallsbelow a given threshold.

7. Results

Drawing the outlines of the final design is a simplematter of clipping each parent along the intervals at whichchildren attach, and clipping each child at the point ofintersection with its parent. Coloring the interior of spiralsis less straightforward.The most attractive color schemes were found to involve

color blends around the spiral sweep such that there issome contrast between concentric layers. A number ofdominant colors are specified for each spiral, and the fillbrush blends from one color to the next along its sweep.However, care must be taken to avoid the pronounced

optical illusion of three-dimensional ridges that may occurif alternating light and dark color shifts fall into phasealong concentric layers. Fig. 6 (left) shows a 7201 sweepblending from white at 01 to black at 3601 to white at 7201.

ARTICLE IN PRESS

Fig. 5. Zoomed views of a sparsely packed area.

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842 839

Page 8: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

The right side of the resulting spiral shows no effect,however the left side shows a pronounced ridged effectdue to the fortuitous combination of color gradients. Fig. 6(right) shows how distracting this effect can becomefor larger designs. This problem may be avoided byensuring that color cycles occur out of phase at say 2701rather than 3601 intervals, so that any residual effect isdistributed across the design at various angles anddiminished.

Another subtlety of coloring is that children must exactlymatch their parent’s color along the branch interval. If achild branches midway between two dominant parentcolors, then its color scheme may benefit from sometweaking (such as a cycling of its colors) to avoid thepropagation of a diluted color mix. For instance, if theparent is red and blue, then some of its descendants will bepredominantly purple unless adjusted.Fig. 7 shows a connected set of spirals generated from a

single seed pair constrained to a Paisley shape, withexterior flourishes added after the removal of the bound-ary. Each spiral’s color palette covers the spectrum.This image was exported in PostScript format, thentreated in Photoshop with a ‘‘glass’’ filter that suggests a

ARTICLE IN PRESS

Fig. 6. The spiral ridge illusion caused by concentric color gradients in phase.

Fig. 7. A single connected set of spirals.

Fig. 8. Under the spreading curly tree (Ficus archimedea).

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842840

Page 9: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

pythree-dimensional meniscus through judicious shading andhighlights.

Fig. 8 shows a tree-like design generated from a singleseed pair, one of which was excised from the final designand replaced manually with the trunk silhouette. Thisfigure shows the footprint of the spiral set (black) minus itsoutline (white) attenuated for width according to spiralsize.

The three distinct spiral sets in Fig. 9 themselves followspiral paths. The spirals within each set have color palettesbased on brightness variations of that set’s primary color:red, green or blue. This figure shows unmodified PostScriptoutput from the spiral design editor.

Fig. 10 shows four distinct spiral sets, each constrainedto a disjoint area of the Yin Yang shape. The spiral setswere mapped onto a hemisphere, then POV-Ray sphereprimitives generated at regular intervals along each spiralpath with radii based on spiral width. The end result wasfour polyspheres, which were renderd using the POV-Rayray tracer.

Each of these designs were generated interactively usingthe spiral design editor and took from half an hour to twohours to complete.

8. History

The idea of spiral packing for space-filling artisticdesigns occurred to the first author during a plane flightto Istanbul. However, seeing the very same principles inaction the next day on the walls of the 6th century AyaSofia mosque (Fig. 11, left) indicated the prevalence of this

motif in the history of art. There are many precedents, anearly example being the tri-spiral stone carvings from theNewgrange tomb in Ireland (Fig. 11, right). These carvingswere made circa 3100 BC, predating the Celtic style ofartwork—which is replete with interlocking rather thanbranching spirals—by over 1500 years.

ARTICLE IN PRESS

Fig. 9. Intertwined arms in red, green and blue palettes. Each arm is a single connected spiral set.

Fig. 10. Four connected spiral sets exported as polyspheres mapped onto

a hemisphere.

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842 841

Page 10: Cameron Browne and Paul van Wamelen- Spiral Packing

Autho

r's

pers

onal

co

py

It is interesting to note that after placing a seed pair tostart a spiral packing, the tri-spiral is the most natural stepto take next. Four-sided placements are generally lesselegant and more difficult to work into a design, as can beseen in Fig. 2.

Hargittai and Pickover [5] give an excellent overview ofspirals in art, nature and science.

9. Conclusion

This paper describes a method for creating connectedspiral sets which may be used to fill given boundary shapesto a given density, for artistic purposes. A numericalsolution for exact fitting is given, as well as an iterativemethod based on the approximation of spirals by circles.

Future work might include the implementation of theexact geometric solution for the spiral fitting problem to

allow accurate packing to as yet untried levels, and theautomation of the packing process using the techniquessuggested.

References

[1] Weisstein E. Concise encyclopedia of mathematics. Boca Raton: CRC

Press; 1999.

[2] Bourke P. An introduction to the Apollonian fractal. /http://

astronomy.swin.edu.au/�pbourke/papers/apollony/apollony.pdfS[3] Kasner E, Supnick F. The Apollonian packing of circles. Proceedings

of the National Academy of Sciences of the United States of America

1943;29:378–84.

[4] Manna S, Herrmann H. Precise determination of the fractal

dimensions of Apollonian packing and various space-filling bearings.

Journal of Physics A: Mathematical and General 1991;24:L481–90.

[5] Hargittai I, Pickover C, editors. Spiral symmetry. Singapore: World

Scientific; 1992.

ARTICLE IN PRESS

Fig. 11. A mural in the Aya Sofia mosque (Istanbul) and the Newgrange tri-spiral (Ireland). Photos by Helen Gilbert and Jorge Tutor

r /www.jorgetutor.comS.

C. Browne, P. van Wamelen / Computers & Graphics 30 (2006) 834–842842