Home Cooking XML Page Civil War Letters Art (more)

# Pseudospirals

A pseudospiral is composed of adjoining circular arcs. If you 90 degree arcs with radii increasing per the Fibonacci sequence, you get a Fibonacci spiral.

The calculation is simpler if you do this with polar coordinates (or, if you like, on the complex plane). Iterating through the sequence of radii, each arc is drawn from `θ` to `θ + π/2` using the radius from the sequence and the current center `z0`. Values are updated for each radius in the sequence. If `zn` is the last point in the current arc and `rφ(u,v)` indicates a polar point with radius `u` and angle `v`:

```              r' = next radius in sequence
z0' = zn - rφ(r', θ+π/2) = zn - r'*e^(i*(θ+π/2))
θ' = θ+π/2
```

The points on the arc are just the points `zi = z0 + rφ(r, θ + (i/n)*(θ/2))`.

You don't have to use the Fibonacci sequence. Any monotonically non-repeating sequence will do.

The Lazy Caterer sequence, for a more gentle growth:

You don't really need things to be monotonically increasing. Where the radius decreases from one step to the next you get loops.

Here we use a sequence formed by the digits of division of two mutually prime numbers. (9 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0 9 9 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0 9 9 7 7 6 5)

You don't really need the sequence to only have positive numbers. When the radius is negative, it just means that the arc flips to curve the other way. Different patterns of negation can give you different kinds of patterns.

Fibonacci sequence, mirrored to negative numbers, i.e. ...-34 -21 -13 -8 -5 -3 -2 -1 -1 1 1 2 3 5 8 13 21 34..., or with negatives alternating, i.e. 1 -1 2 -3 5 -8 13 -21 34

We can also randomize the negations, or use some binary sequence to drive the them, such as the Fibonacci word, or the de Bruijn sequence. Or we can just randomly pick.

Another tweak we can make is to not use a constant radius for the arcs. We can apply a function that leaves the endpoints untouched but alters things in the middle, or we can just accept jumps in the curve and apply a function that changes the endpoints of the arc as well.

## Multiple lines

Now we have the basic curves, we can draw them at various scales to fill the space. The way to do this is raise the sin and cos in the calculation to some power `p`. Where `p > 2` the curves bulge inwards tending towards a plus sign; where `0 < p < 2` the curve bulge outwards tending towards filling the square. At `p = 2` you get the perpendicular lines of the square. The calculation is slightly tricky because you need to be careful about angles where the sin or cos is close to zero (I check against a small ε and snap to 0), and you need to raise the power of the absolute value:

```zi.r = r * sign(cos(θ + (i/n)*(θ/2))) * abs(cos(θ + (i/n)*(θ/2)))^p + z0.r
zi.i = r * sign(sin(θ + (i/n)*(θ/2))) * abs(sin(θ + (i/n)*(θ/2)))^p + z0.i
```

I then split the p range I'm using (I use a random power spacing) and draw each of the resulting lines. With the variations in gain functions, radius sequences, and negation sequences, a great variety of interesting patterns arise.

Fibonacci, no negation, no gain Mirrored row from Pascal's triangle, center gain

Padovan, alternating negation, center gain Feigenbaum, no negation, S-curve gain

Golomb, alternating negation, sinc gain Fractal, random negation, S-curve gain

Mirrored Feigenbaum, parabolic gain De Bruijn, alternating negation, sinusoidal gain

Random, random negation, S-curve gain Thue-Morse, no negation, sinc gain

## Anamorphic tiling

Gnomic tiling is based on the idea of starting with a seed tile (the gnomon) and increasing it geometrically in a circular arrangement. Waldman[2] extends this idea to using arbitrary growth driven by the same spirals and spiral-growth sequences. The points of the triangles follow the spiral as it grows.

Here is a tiling constructed off the grasshopper sequence (no negations of gain function), with the driving spiral shown.

This can create all kinds of interesting patterns of triangles:

Lazy-caterer, alternating negation Mirrored random positives and negatives

Mutual prime division, alternating negation Sorted random plus and minus, alternation flipped

We don't have to just draw the triangles, though, just as we didn't have to just draw the spiral arcs. We can just use this as another way of dividing space and creating interesting arrangements. Here I use the triangles to construct a cubic curves: