• January 22, 2021, 12:59:34 PM

### Author Topic:  Mandelbrot 2D projection using geometric algebra  (Read 179 times)

0 Members and 1 Guest are viewing this topic.

#### youhn

• Fractal Freshman
• Posts: 9
##### Mandelbrot 2D projection using geometric algebra
« on: January 13, 2021, 10:38:13 PM »
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/K0vrMcK

Python code:
Code: [Select]
import matplotlib.pyplot as pltimport 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 iterationsr = 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 loopfor 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)

#### youhn

• Fractal Freshman
• Posts: 9
##### Re: Mandelbrot 2D projection using geometric algebra
« Reply #1 on: January 16, 2021, 12:33:19 PM »
Some first results for a julia set.

Still have some doubts if this is new, perhaps I posted in the wrong forum place.

### Similar Topics

###### Mandelbrot set interior description with simple geometric objects

Started by marcm200 on Fractal Mathematics And New Theories

5 Replies
543 Views
March 19, 2020, 07:47:52 AM
by marcm200
###### perturbation algebra

Started by claude on Fractal Mathematics And New Theories

2 Replies
549 Views
May 20, 2019, 06:45:21 AM
by LionHeart
###### basic algebra problem

Started by woodymnt on Noob's Corner

2 Replies
168 Views
March 30, 2020, 08:58:53 PM

Started by mclarekin on Fractal Image Gallery

0 Replies
160 Views
August 12, 2018, 02:36:42 AM
by mclarekin
###### quaternion imaginary scator algebra

Started by mclarekin on Fractal Image Gallery

0 Replies
146 Views
July 02, 2018, 02:20:07 PM
by mclarekin