Recursive Rosettes
Year: 2014 Authors: Paul Gailiunas
Core claim
The recursion R(n)=R(n-1)R(n-2)R(n-2) produces palindromic geometric paths that can close into many distinct rosettes, depending on turn angles and parameter choices.
Topics
recursive geometry, rosette patterns, palindromic strings, search methods
Domains
recurrence relations, discrete geometry, combinatorics, symmetry, generative art, turtle graphics, pattern design, visual complexity
Methods
recursion analysis, induction proof, parameter search, LOGO implementation
Media
LOGO, spreadsheet, turtle geometry, geometric diagrams
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.
Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture
Recursive Rosettes
Paul Gailiunas
25 Hedley Terrace, Gosforth
Newcastle, NE3 1DP, England
email: paulgailiunas@yahoo.co.uk
Abstract
Recursively generated geometric structures are usually something like a fractal: generally in the limit they will be true fractals. At least one recursive function, which is actually very simple, can generate a wide range of nonfractal cyclical structures with various visual characters. There are infinitely many such rosette structures, and it is by no means certain that they have all been identified. (“Rosette” is used here in the general sense of a circular rose-like pattern, rather than referring to classical rosette curves, which are related to epicycloids.) After an analysis of the mathematical structure of the recursive function, methods of searching for the rosettes that it generates are discussed.
A Simple Recursive Function
Probably the best-known recursive function is the one that generates the Fibonacci numbers:
but such functions need not relate to numbers only. For example the terms could indicate geometric operations (here indicated by a script font), just as algebraic expressions in group theory might refer to symmetry operations. Here the starting terms, and , will denote elementary operations in turtle geometry [1]: forward a step, turn an angle, and the recursion formula will concatenate these operations.
The formula is just as simple as that which defines the Fibonacci numbers, and it is almost as rich in its outcomes. If is a forward step then a right turn, and is a forward step then a left turn, a fractal-like path is produced having a similar appearance to the Koch snowflake curve (figure 1). Notice that it is symmetrical about its mid-point, and the first and last segments are parallel; if is even, as in figure 1, they are collinear: properties which would not be immediately predictable from the recursion formula.
Figure 1: A simple application of the recursion formula .
The algorithm can be easily implemented using LOGO [2]:
Gailiunas
| to a | to b | to R :n | to rose :n :stepa :x :stepb :y |
|---|---|---|---|
| fd :stepa | fd :stepb | if :n = 1 [a stop] | cs |
| rt 360/:x | lt 360/:y | if :n = 2 [b stop] | R :n |
| end | end | R :n - 1 R :n - 2 R :n - 2 | end |
| end |
Some insight into the geometric behaviour of this function can be gained simply by counting the terms, treating the formula in the usual way as a numerical relationship but keeping and separate, so that counts the number of occurrences of right turns, counts the number of occurrences of left turns, , , , . Of course the total number of terms, .
| n | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| a | 1 | 0 | 2 | 2 | 6 | 10 | 22 | 42 | 86 | 170 | 342 | 682 | 1366 | 2730 | 5462 | 10922 |
| b | 0 | 1 | 1 | 3 | 5 | 11 | 21 | 43 | 85 | 171 | 341 | 683 | 1365 | 2731 | 5461 | 10923 |
| R | 1 | 1 | 3 | 5 | 11 | 21 | 43 | 85 | 171 | 341 | 683 | 1365 | 2731 | 5461 | 10923 | 21845 |
Table 1: The number of terms of each type at each level of recursion.
The table shows that and , so that the number of terms approximately doubles at each iteration, and . There are standard ways to analyse numerical recursion relationships like these to derive explicit formulae. Suppose that a solution is of the form then:
Recursive Rosettes
A little experimentation reveals that concatenating strings of and according to the recursion relationship produces a palindrome with either an extra ( even) or ( odd) at the end, corresponding with the term:
a b baa baabb baabbbaabaa baabbbaabaabaabbbaabb baabbbaabaabaabbbaabbbaabbbaabaabaabbbaabaa
A proof by induction shows how this happens: if
Different Angles
Writing the angle turned in as A and that in as B, if the path will not finish with a segment collinear with the starting segment, and the result is, in general, a confused mess. Suppose, however, that the final segment is parallel to the first although drawn in the opposite direction. Now suppose that the iteration is continued to the next stage. The same path will be drawn almost twice, once in reverse since the concatenated operations are palindromic apart from an additional or term. Since the path is (almost) symmetrical the reversal makes no difference, but the extra terms cause a change in direction. Apart from a few special cases, if the change in direction is a rational part of a complete turn there will be some stage when the path will close, and further iterations will just retrace the path already followed, generating a rosette. Exceptions occur when the effect of the repeated change in direction at some depth of recursion is equivalent to a whole number of turns, resulting in a net translation, rather than a rotation. The resulting path can be considered to be a rosette with infinite radius, just as a straight line can be seen as the limit as a circle increases in radius (figure 2, the numbers will be explained later).
Figure 2: A section of a rosette with infinite radius.
16/7 8
Gailiunas
After recursion to depth, , there have been turns in one direction and in the other, so the total angle turned is . The path will close (at some depth of recursion > n ) whenever is , more conveniently expressed as turn, or some odd multiple, , of turn. Since there are several parameters in this relationship there is a large solution space, but solutions with large or small A or B will generally be drawn too densely to be very interesting visually, narrowing the search.
Low Depth of Recursion
One simple strategy to find interesting rosettes restricts the search to low depths of recursion and angles that are exact divisions of a complete turn. It will be convenient to put turn and turn. The condition for a closed path is then:
The lowest reasonable value of so the condition becomes . Restricting the solutions to positive values (actually not necessary) the divisors of 6 (hence possible integer values of ) are 2, 3, 6. Discounting the solution (a full turn) this leaves and . Noting that the fractions need not be in lowest terms, the solutions are , and , (figure 3).
26
3 18
Figure 3: Rosettes (with integers) corresponding to the lowest feasible depth of recursion.
The alternative condition is . Possible divisors of 4 are 2, 4, giving the solutions , ; , ; , (figure 4).
Recursive Rosettes
20 5
4 3
Figure 4: The alternative simple solutions from the lowest feasible level of recursion.
Figure 5: A selection of rosettes with integral and from recursion level .
Gailiunas
Even though this approach is limited to integer values of and it rapidly gets out of hand. The next level of recursion, , produces 17 different possibilities. Figure 5 shows some of them.
Some Simple Rosettes
It is not always the case that a low value of will produce only simple rosettes as can be seen from figure 5, and not all simple rosettes have angles that are exact divisions of a whole turn. It is perhaps not surprising that there is a simple rosette with and (the internal angle of a pentagon), which is another solution of the case first considered ( ).
Another very simple rosette has and . It is a solution in the series with :
10/3 10
20-22×(3/6)=9=3×3
5 10/3
24 12
3 6
9 6
Figure 7: Some very ornate examples.
Figure 6: Some simple rosettes.
9 18/7
Recursive Rosettes
More Elaborate Rosettes
Figure 7 shows further possibilities. The left hand example comes from the set of solutions in the series ( ), but that on the right was discovered in a completely different way. Noting that the (5, 10/3) example, in figure 6, has angles that are supplementary ( and ) further such solutions were sought, essentially by trial and error, using a spreadsheet to carry out the calculations. The next value of (which is 9) that produces such a solution has and , generating the rosette illustrated.
Calculating More Solutions
Probably the most obvious way to find further solutions is by straightforward algebraic manipulation of the basic condition to include in a spreadsheet:
Tabulate integer values of for various values of and to determine candidate fractional values of . Similarly tabulate integer values of to find fractional values of . Negative values of will also work.
Typically a rosette will be completed at a recursive depth of about 12, but often some parts of the path that is generated by recursion are retraced before the rosette finally closes, and values of about 16 are not unusual in such examples. As a consequence the angles must be specified with considerable accuracy otherwise the accumulated errors become significant by the time the path closes, and the spreadsheet should be programmed to output values as fractions (in lowest form) rather than decimal approximations. Apart from anything else, fractions with small numerators, which are more likely to produce interesting rosettes, are more easily identified.
If fractional values of both and are considered the search space becomes even larger, but by starting with known examples that are not too visually dense the chances of finding further visually interesting rosettes are increased: if then multiplying by any odd number will give another solution, so , ( odd) are feasible candidates. It could be possible to simplify the fraction if divides either or . If either or is a fraction it is possible that or y / q < 1 , and in this case, because these are fractions of a turn, it is possible to simplify to the reciprocal of or , for example , produces an interesting rosette; another is produced by , .
Gailiunas
8 20/9
Figure 8: One rosette solution can be derived from another.
8/3 20/7
What Affects the Appearance of a Rosette?
Generally it is not obvious which calculated solutions will be interesting, and most generate a path that is visually too dense. Examples like that in figure 8 with and a non-integral ( ) would not seem immediately very promising, and are not easily found by a simple trial and error search among the multitude of possibilities. The values of the parameters , and provide some clues about how the rosette will appear.
The symmetry of the rosette is related to the numerators of or , as the examples show, but not in a simple way. For example the two in figure 2 are as might be expected, with orders of symmetry equal to the 6 and 18 respectively, but 8 20 (figure 5) and 24 12 (figure 6) have lower orders than might be expected, and 8 4 (figure 4) is possibly even more surprising. As already indicated if either of the numerators is large it is likely that the rosette will be visually dense, but this is not an invariable rule.
If is large the segment of path that repeats around the rosette is more complex, and few rosettes with n > 7 are very pleasing. That in figure 8, with , is very unusual. The same figure also shows the effect of a high value of : the path has many loops, although the looping is not always so obvious.
Given the very large search space, even with these insights, finding new visually interesting rosettes is a tedious exercise, but one which can be rewarded by some unexpected discoveries. It is not difficult to show that any recursion of the form will generate palindromic strings, so the search space is actually even larger, although most examples with t > 1 are generally too complex to have much visual appeal.
References
[1] Abelson H. and diSessa A., Turtle Geometry, MIT, 1980. [2] Harvey B., Computer Science Logo Style, MIT, 1986.