Been playing around with the mandelbrot formula, trying to work it out in geometric algebra:

\( x \rightarrow x^2 + c_0 \)

\( x_0 = 0 \)

\( c = a + be_{12} + ce_{23} + de_{31} \)

The \( e_{12} \) is short for \( e_1e_2 \), which in the context of geometric algebra (clifford algebra) is the bivector formed by vectors \( e_1 \) and \( e_2 \). This should be (about?) the same as quaternions, but somewhat less complex. Based on the specific algebra rules, I think this works out to the following iteration calculation step:

\( a = a^2 - b^2 - c^2 - d^2 + a_0 \)

\( b = 2\left(ab - cd\right) +b_0 \)

\( c = 2\left(ac + bd\right) +c_0 \)

\( d = 2\left(ad - bc\right) +d_0 \)

Based a simple python code from

https://rosettacode.org/wiki/Mandelbrot_set this seems to work, as it results in a nice mandelbrot set if plotted on (a, b) or even (a, c) or (a, d).

The planes (b, c), (c, d) and (b, d) result in other shapes. In order:

Some questions I have due to my lack of math and programming skills:

Does this indeed give the same results as quaternions?

How this this look in 3D?

Some wobbly variation of parameters:

https://imgur.com/a/K0vrMcKPython code:

`import matplotlib.pyplot as plt`

import math

def linspace(start, stop, num):

return [start + (stop - start) / (num - 1) * k for k in range(num)]

def zeros(rows, cols):

return [[0 for j in range(cols)] for i in range(rows)]

d, n = 150, 120 # pixel density & number of iterations

r = 1 * 2 ** 2 # escape radius (must be greater than 2**2)

x = linspace(-2.2, 1.0, 4 * d + 1)

y = linspace(-1.2, 1.2, 3 * d + 1)

T = zeros(len(y), len(x))

var = linspace(0.0, 1*3.14159, 40) # parameter variation and no. of frames

# time loop

for m, varc in enumerate(var):

# C in geometric algebra [scalar, e12, e23, e31]

a0 = 0.0

b0 = 0.0

c0 = 0.0

d0 = 0.0

b0 = 0.45*math.sin(varc)

c0 = 0.45*math.sin(varc*2)

# vector factor (should be 2 for the standard mandelbrot)

f = 2

# image loop

for i, d0 in enumerate(y):

for j, a0 in enumerate(x):

a = 0.0

b = 0.0

c = 0.0

d = 0.0

# iteration loop to check for escape or bound

for k in range(n):

aa = a ** 2

bb = b ** 2

cc = c ** 2

dd = d ** 2

if aa + bb + cc + dd > r:

break

# set temp variables to prevent calcuation errors

ax = a

bx = b

cx = c

dx = d

a = aa - bb - cc - dd + a0

b = f * (ax*bx - cx*dx) + b0

c = f * (ax*cx + bx*dx) + c0

d = f * (ax*dx - bx*cx) + d0

T[i][j] = k + 1

filename = "mbga" + str(m).zfill(2) + ".png"

print(filename)

plt.imshow(T, cmap=plt.cm.twilight_shifted)

plt.axis('off')

plt.savefig(filename, dpi=230, bbox_inches="tight", pad_inches=0)

Linkback: https://fractalforums.org/fractal-mathematics-and-new-theories/28/mandelbrot-2d-projection-using-geometric-algebra/3987/