Doyle Spiral Circle Packings Animated
Year: 2008 Authors: Alan Sutcliffe
Core claim
Doyle spiral circle packings provide a rich mathematical resource for animated visual art, combining geometric structure with self-similar and decorative transformations.
Topics
circle packings, self-similarity, animation, mathematical art
Domains
geometry, logarithmic spirals, circle packing, self-similarity, mathematical art, animation, visual design, decorative graphics
Methods
geometric derivation, visual approximation, parameterized animation, pattern repetition
Media
computer animation, still images, screen display, graphics program
Paper text
The text below is the locally extracted OCR/Markdown version of the paper. Raw PDF files remain local and are not published here.
Alan Sutcliffe
4 Binfield Road
Wokingham
RG40 1SL, UK
E-mail: nsutcliffe@ntlworld.com
Abstract
Doyle spiral circle packings are described. Two such packings illustrate some of the properties of the packings in general, with some of the mathematics needed for their construction. Each of these two packings is the basis for a short animation. The first uses self-similarity to make endless zooms by repetition of a short sequence. The second animation is composed of short sections using the circle packing in different decorative forms. A visual aid to approximation is described.
Doyle Spirals and Circle Packings
Doyle spirals [4] are the basis for a family of circle packings each of which covers the plane. They have a number of characteristics: for example, each circle touches six others, and the centre of each circle lies at the intersection of three logarithmic spirals that have a common origin at the centre of the configuration, referred to here as the spiral centre. These properties and others can be seen Figures 1 and 2.
Figure 1: Doyle Spiral Circle Packing , and .
The circles extend indefinitely outwards across the plane with ever increasing radii, and with ever decreasing radii inwards towards the spiral centre. Each packing can be seen as based on a set of equally spaced logarithmic spirals in three ways. In each view every circle lies on just one spiral arm, as shown in Figure 2. The term spiral arm refers not just to the spiral line that passes through the circle centres but to the set of circles. Within a view, two spiral arms are congruent if their circles have the same sequence of
radii. Otherwise they are similar and the sequences of radii differ by a scaling factor. The six neighbours of a circle are in three pairs, each pair on the same spiral arm.
In general the three views of a packing have a different number of arms: the exceptions are explained below. In each packing each circle lies on three spiral arms, one from each view. These triple intersections of the spirals at the circle centres are their only intersections. For each view, the ratio of the radii of any two adjacent circles on the same spiral arm is constant. Each packing can be identified uniquely by the numbers of spiral arms in its three views, and these are denoted by the , values, as shown in Figure 2.
2 Spiral Arms
10 Spiral Arms
Figure 2: Three Views of the Packing , and .
12 Spiral Arms
is the number of arms with the least curvature and Q > 2 .
where and , so that is dependent on and .
Except when or , is the number of arms with greatest curvature, and the spirals are in the direction counter to the other two sets.
The sets of values correspond one to one with the Doyle circle packings. The primary direction of all spirals considered here is clockwise. If differing values of and are interchanged, so that p_1 > p_2 , a mirror image of the whole packing results. The straight lines that appear when can be seen as the threshold between these two mirror worlds.
When , as in Figure 4, the spirals become straight lines – in this case the axes – and the other two pairs are mirror images of each other, with the same curvature.
When and , the spiral does not disappear but becomes a set of concentric circles around the spiral centre. The other two sets are again mirror images.
When and have no common factor with , no spiral arms are congruent and every circle in the packing has a different radius. When divides , there are congruent spiral arms equally spaced around the spiral centre. Consequently every circle is in a set of circles with the same radius. The two spiral arms shown in Figure 2 illustrate this property. In the remaining cases, where and have a common factor less than , I conjecture that their highest common factor is the number of congruent spiral arms and the number of circles having the same radius. This is true for the other two views in Figure 2. Figure 3 shows the pairs of congruent spiral arms for the views with 10 and 12 spiral arms. It would not be useful to show the case with two spiral arms as they are a congruent pair and so all the circles would be filled with the same shade.
These are my own observations. More of the mathematics of the Doyle spiral packings is given in [1, 2, 3, 4, 5]. Weeden [6] has studied the Doyle spirals extensively and I am grateful for access to his unpublished papers and for his unstinting help. I prefer the form of , notation introduced here to that used by Stephenson and others which gives only one value, usually the larger but sometimes the smaller.
Figure 3: Pairs of Congruent Spiral Arms for , and .
An important characteristic of all these circle packings is self-similarity. Each circle in a packing is equivalent to any other by scaling and/or rotation. In each packing the ratio of the distance of the centre of a circle from the spiral centre to its radius is constant. Other key ratios are between the radii of pairs of touching circles.
A Simple Packing
For some simpler packings these ratios can be derived by geometry and self-similarity, without reference to the spirals. Figure 4 shows part of such a packing, with its spirals. Note that in this case four of the spirals have degenerated into straight lines - the horizontal and vertical axes.
Showing Spirals
The Relationships between Three Circles
Figure 4: and .
Figure 4 also shows the relationships between three circles in this packing and the spiral centre, . The radius of the smallest circle can be taken as 1 without loss of generality. The ratio of the distance of the centre of a circle from the spiral centre to its radius is . The expansion factor from one circle to the
next larger one is , so is the radius of the middle sized circle. The values of and can be derived as follows.
From the right-angled triangle in Figure 4, , which gives . From the two expressions for the length of the base line , which gives . These two expressions for lead to . Apart from , which can be ignored, this equation has two real roots: and its reciprocal , where is the golden ratio, : interesting roots for such an ordinary looking equation. These values are enough to construct the packing. Like others, this packing can also be constructed by reducing radii, working inwards towards the spiral centre just as well as by increasing them, and the reciprocal root is the factor for this reduction. This duality of increasing and decreasing radii is common to all Doyle packings, so in every case there will be a pair of reciprocal roots to the equations for this factor. For other packings with the second equation still holds and an equation more complex than the first can be derived, but an algebraic solution to this pair of simultaneous equations may not be possible.
A First Animation
The packing with and is unchanged on rotation by radians (90 degrees) and enlargement by a factor of . This identity can be demonstrated by animating the transformation in steps where each step has rotation by (an additive factor) of and increase in size by (a multiplicative) factor of . Mathematically identical packings result. In a computer animation sufficient levels must be shown that the largest circles (any part of which lies on the screen), and the smallest visible circles (with a radius of a few pixels) are displayed. In the realisation described here four levels, each showing two pairs of the packing circles, are enough to ensure this. 40 steps in each quarter turn give reasonably smooth animation. The first and last frames are the same, and the sequence can be repeated to give a smooth and seemingly endless zoom towards the spiral centre, without ever reaching it: ever changing, ever repeating. Six frames from the sequence are shown in Figure 5.
Figure 5: A Filmstrip from the First Animation, showing Rotation and Expansion.
The program is written in Visual Basic (VB) and runs in real time within the VB environment. Twenty repetitions of the sequence are shown, the only change being a gradual reduction of the delay between frames to increase the speed of zoom. A smaller circle (not shown in Figure 5) is drawn inside each main circle to give a sense of the circles tuning. More complex rendering of the circles reduces the speed of animation until no added delay is needed between frames; beyond that the animation becomes too jerky. As the complexity of rendering increases, a point is reached, depending on the power of the system, where the rate that can be achieved falls below that needed for smooth animation: roughly 20 frames per second. Some improvement can be got by compiling the code to run as a .exe file, but that has not been done here. For more complex rendering, frames can be saved automatically and loaded into a conventional animation package.
An idle loop was needed between most frames of the animations to slow the motion to the speed wanted. One sequence in the second animation goes beyond the limit of rendering that can be got with the hardware used: a standard laptop. Figure 6 shows a frame from the second animation where the circles are given a 3d appearance by filling each one with concentric circles having graduated shades of colour
becoming lighter towards the slightly off-centre highlight. This rendering is rapid but becomes a visible part of the animation: roughly 20 of the larger circles are rendered per second, more for the smaller circles.
Figure 6: A Packing Rendered with Highlights from the Second Animation.
The packing shown in Figure 4 is also unchanged on enlargement by a factor of , without rotation. A similar animation of an endless zoom forms the second section of this animation. For this 80 steps are used in the basic sequence to give smooth movement. Reduction rather than expansion is used so the appearance is of zooming out.
The third and last main section of the first animation is based on the first section but with the reflection of the image in the vertical axis added. Figure 7 shows a typical frame from this sequence. The overlapping of the reflections, rotating in opposite directions, removes any sense of the image zooming. At the start of each sequence the original and its reflection are identical, giving a resolution of the more complex intermediate frames. To show this more clearly the animation is paused at this point for the first few repetitions of the sequence.
Figure 7: An Intermediate Frame from the Mirrored Sequence.
This animation could be the basis for a work with a higher ratio of art to mathematics. As a small step
in this direction, during the last repeat of the basic sequence in each main section the screen is not cleared between frames so that all 40 frames are overlaid, giving the design from the first section shown in Figure 8.
Figure 8: Overlapped Frames from the First Animation.
A Second Animation
The second animation uses mainly the Doyle packing , and shown in Figures 1 and 2. The roots of the equations, needed for this packing to be constructed, are not known algebraically and can only be derived by numerical approximation. The values for the view with two spiral arms were found by numerical approximation. Constructions using constants for the views with ten or twelve spiral arms are also possible. This animation is more decorative than mathematical.
Figure 9: A Frame from the Second Animation.
After the titles, shown over a background of the basic packing, the first section shows twin mirrored spiral formations growing to fill the screen. The next section shows the packing as composed of two spiral arms. This darkens to near black, and then lightens to show ten spiral arms. After this, a spiral expands and then contacts leaving a display of the edges that are not overwritten, as the screen is not cleared
between frames. Over this twelve randomly placed smaller spirals expand in different colours and orientations (Figure 9). The whole screen is then subject to a sequence of colour changes using XOR. The small spirals unwind, and the whole screen is wiped with XOR applied using a different colour on each pixel.
A Visual Aid to Approximation
One method used in finding good approximate values for drawing Doyle circle packings is to draw and inspect arrays of packings having a range of controlling parameters. A good approximation may not be mathematically correct, but it is visually correct at the screen resolution being used. The controlling parameters for a packing are starting values and increments from one circle to the next of the distance of the centre from the spiral centre and the angle between the lines connecting the centres to the spiral centre. In the example array shown in Figure 10 the distance increases left to right and the angle increases down the display. The program for this array draws only one spiral arm and so draws approximate packings only for cases with .
In Figure 10, the third spiral down the leftmost column is a good approximation for , and . It can be refined by running the program again with smaller increments. The packing above it is a rough approximation to , and . There is a solution for , and around the lower right of the array.
Figure 10: An Array of Approximations.
The ratio of the circle radius to its distance from the spiral centre may also need to be adjusted. This is easy to judge visually: when the overlaps or gaps between adjacent circles are consistently in proportion a change to the radius ratio can be made so that adjacent circles touch.
Incidental Graphics
Several still images have resulted from this work, some by accidents such as programming errors: Figure 11 shows an example. Some of these will be shown in the presentation, along with the animations.
Figure 11: An Accidental Graphic.
Last Thoughts
In the space of graphic arts based on mathematics, one dimension runs from visualisation of mathematical properties to the decorative use of mathematically derived patterns. The two animations described here are toward the opposite ends of this dimension. The first animation illustrates the self-similarity of Doyle packings and visual effects arising from it. The second is more decorative. The movement of circles in the animations is only along the spiral that their centres lie on – sometimes the special case of a straight line. But every circle in a packing can be transformed into any other by scaling and rotation about the spiral centre. The animation of such a general transformation is a likely development from the current work.
Doyle spiral circle packings are a rich resource for mathematical art and I hope that others will be encouraged to investigate and use them further.
References
[1] Dov Aharonov and Kenneth Stephenson, Geometric Sequences in Discs in the Apollonian Packing, Algebra i Analiz, 9, 3, 1997, pp 104 - 140. [2] Alan Beardon, Tomasz Dubejko and Kenneth Stephenson, Spiral Hexagonal Circle Packings in the Plane, Geometriae Dedicata, 49, 1994, pp 39 - 70. [3] A. L. Bobenko and Tim Hoffman, Conformally Symmetric Circle Packings: a Generalization of Doyle’s Spirals, Experimental Mathematics, 10, 2001, pp 141 - 150. [4] Peter Doyle, He Zheng-Zu and Burt Rodin, Second Derivatives and Estimates for Hexagonal Circle Packing, Discrete Computational Geometry, 11, 1994, pp 35 - 49. [5] Kenneth Stephenson, Introduction to Circle Packing, Cambridge University Press, 2005. [6] Ron Weeden, Hexlets and Doyle Spirals and other unpublished papers, revised 2007.