**Related articles:** TAD2011.06 Lorenz Attractor | Processing + EPOC via OSC

In his book, *Chaos in Wonderland: Visual Adventures in a Fractal World*, Clifford Pickover describes methods for generating beautiful, complex images from certain chaotic equations. In the context of the book’s narrative, these images are the dreams of a species of inorganic, computer-like entities called the Latööcarfians — the “dream-weavers of Ganymede“. The images function also as the individuals’ names. Here I consider using these images as algorithmically generated magical sigils (cf. generative art).

The images are created by recursively plotting:

*x*_{t} + 1 = sin(*y*_{t}b) + *c* sin(*x*_{t}b)

*y*_{t} + 1 = sin(*x*_{t}a) + *d* sin(*y*_{t}a)

(There are also variant equations that produce “mutations” — see “Appendix A: Mutations of Equations”, pp. 209–210.) Here is a sketch that will draw the following image in Processing:

/** Generative Sigil 1
* Joshua Madara, hyperRitual.com
* Based on code on pg. 26 of _Chaos in Wonderland_
* by Clifford A. Pickover
* Good ranges for a, b, c, and d:
* (-3 < a, b < 3)
* (0.5 < c, d < 1.5)
*/
float a = 1.5641136;
float b = 2.7102947;
float c = 0.9680385;
float d = 0.995141;
float x, y = 0.1;
int counter = 0;
int iterations = 500000;
void setup() {
size(700,700,P2D); // remove P2D for Processing v2.0
background(0); // black
stroke(255,255,255,90); // white, semi-transparent
}
void draw() {
println(counter);
translate(width/2, height/2); // draw from center of window
float xNew = sin(y*b) + c * (sin(x*b));
float yNew = sin(x*a) + d * (sin(y*a));
x = xNew; y = yNew;
point(x*100, y*100);
counter++;
if(counter >= iterations) {
println("done!");
noLoop();
}
}

I hypothesize that the trick to using such images successfully as magical sigils is to assign non-trivial values to the constants, *a*, *b*, *c*, and *d*. One could randomly generate the values at an auspicious moment, or acquire values from some act or object, and map those to the optimal ranges for the algorithm’s constants. E.g., the magician could wear the Emotiv EPOC during a magical invocation, and while invoked, a Processing sketch could map the data from the EPOC’s Affectiv suite for “Excitement”, “Engagement/Boredom”, “Meditation”, and “Frustration”, to the *a*, *b*, *c*, and *d* values for generating the sigil.

Even while keeping the constant values within optimal ranges, not all sets of values produce interesting images. Here is a Processing function to calculate the set’s Lyapunov exponent (based on the code on p. 62) — exponents >= 0.5 tend to be interesting:

public float calcLyapunovExponent(float a, float b, float c, float d) {
float Lsum = 0;
float n = 0; // can replace w/ i of for() loop
float x = 0.1;
float y = 0.1;
float xe = x + 0.000001;
float ye = y;
float xx, yy, xsave, ysave, dLx, dLy, dL2, df, rs, L = 0;
long bigNumber = 1000000000000L; // need a long int for this
for(int i=0; i<1000; i++) {
xx = sin(y*b) + c*sin(x*b); yy = sin(x*a) + d*sin(y*a);
xsave = xx; ysave = yy; x = xe; y = ye; n++;
xx = sin(y*b) + c*sin(x*b); yy = sin(x*a) + d*sin(y*a);
dLx = xx - xsave; dLy = yy - ysave; dL2 = dLx*dLx + dLy*dLy;
df = bigNumber*dL2; rs = 1/sqrt(df);
xe = xsave + rs*(xx - xsave); ye = ysave + rs*(yy - ysave);
xx = xsave; yy = ysave; Lsum = Lsum + log(df); L = 0.721347*Lsum/n;
x = xx; y = yy;
}
return L;
}