
Quaternions

formulas: quat, quatjul


These fractals are based on quaternions. Quaternions are an extension of
complex numbers, with 4 parts instead of 2. That is, a quaternion Q
equals a+ib+jc+kd, where a,b,c,d are reals. Quaternions have rules for
addition and multiplication. The normal Mandelbrot and Julia formulas
can be generalized to use quaternions instead of complex numbers.

There is one complication. Complex numbers have 2 parts, so they can
be displayed on a plane. Quaternions have 4 parts, so they require 4
dimensions to view. That is, the quaternion Mandelbrot set is actually a
4-dimensional object. Each quaternion C generates a 4-dimensional Julia set.

One method of displaying the 4-dimensional object is to take a 3-dimensional
slice and render the resulting object in 3-dimensional perspective.

In xmfract, for the Julia set, you can specify the four parameters
of the quaternion constant: c=(c1,ci,cj,ck), but the 2-dimensional slice
of the z-plane Julia set is fixed to (xpixel,ypixel,0,0).

For the Mandelbrot set, you can specify the position of the c-plane slice:
(xpixel,ypixel,cj,ck).

These fractals are discussed in Chapter 10 of Pickover's "Computers,
Pattern, Chaos, and Beauty".

