Archive for the 'Hypercomplex' Category



28
Jul
09

3D Julia Set

based on Daniel White’s formula for squaring a 3D hypercomplex number

c={-0.2,0.8,0}, imax=12

28
Jul
09

4D “Roundy” Julia Set

{x,y,z,w}2 = {x2-y2-z2-w2, 2(xy+zw), 2(xz+yw), 2(xw+yz)}
c={-0.2,0.8,0,0}, imax=12

24
Jul
09

4D “Roundy” Mandelbrot Set

Mandelbrot Set, imax=24

Minibrot, imax=21

{x,y,z,w}2 = {x2-y2-z2-w2, 2(xy+zw), 2(xz+yw), 2(xw+yz)}
This formula for squaring a 4D hypercomplex number is probably the most popular method for creating 3D Mandelbrot sets. Here is some Mathematica code:
(* runtime: 1.2 minutes, increase n for higher resolution *)
n = 100; Norm[x_] := x.x; Square[{x_, y_, z_, w_}] := {x^2 - y^2 - z^2 - w^2, 2 (x y + z w), 2 (x z + y w), 2 (x w + y z)};
Mandelbrot4D[qc_] := Module[{q = {0, 0, 0, 0}, i = 0}, While[i < 24 && Norm[q] < 4, q = Square[q] + qc; i++]; i];
image = Table[z = 1.5; While[z >= 0 && Mandelbrot4D[{x, y, z, 0}] < 24, z -= 3/n]; If[z < 0, -1.5, z], {y, -1.5, 1.5, 3/n}, {x, -2.0, 1.0, 3/n}];
ListDensityPlot[image, Mesh -> False, Frame -> False, PlotRange -> {-0.1,1.5}]

Links

07
Jul
09

4D Quaternion Mandelbrot Set

Mandelbrot Set, imax=12

Minibrot, imax=18

{x,y,z,w}2 = {x2-y2-z2-w2, 2xy, 2xz, 2xw}
Quaternions are 4D hypercomplex numbers, discovered in 1843 by Sir William Rowan Hamilton. They are mathematically elegant, but unfortunately, they produce axisymmetric results when used to calculate the 3D Mandelbrot set.

Link: Quat Minibrot – by David Makin

07
Jul
09

4D Mandelbrot Set

based on 4D analog to Daniel White’s formula for squaring a 3D hypercomplex number
Here is a 4D version of Daniel White’s formula for squaring a 3D hypercomplex number. In 4D, rotation is about a plane and there are 6 possible rotational matrices to choose from: Rxy, Ryz, Rxz, Rxw, Ryw, Rzw. Following this train of thought, I came up with the following 4D analog to Daniel’s formula by applying three consecutive 4D rotations:
{x,y,z,w}2 = Rxy(2θ)Rxz(2φ)Rxw(2ψ){r2,0,0,0}, r2=sqrt(x2+y2), r3=sqrt(x2+y2+z2), r=sqrt(x2+y2+z2+w2), θ=atan(y/x), φ=atan(z/r2), ψ=atan(w/r3)
This can be expanded to give:
{x, y, z, w}2 = r2{cos(2ψ)cos(2φ)cos(2θ), cos(2ψ)cos(2φ)sin(2 θ), -cos(2ψ)sin(2φ), sin(2ψ)}
This formula reduces to Daniel’s squaring formula when w = 0 and reduces to the regular complex squaring formula when w = z = 0. For faster calculations, this formula can be simplified to:
{x, y, z, w}2 = {(x2-y2)b, 2xyb, -2r2za, 2r3w}, a=1-w2/r32, b=a(1-z2/r22)
Using this formula, I rendered 3D slices of this 4D Mandelbrot fractal at w = 0, z = 0, y = 0, x = 0. Note that the case when z = 0 happens to be the same as Karl’s variation of Daniel White’s formula.

06
Jul
09

3D Exponential Mandelbrot Set

This is what the Mandelbrot set looks like if you vary the exponent along the third dimension. It has a twisted shape because the features of the Mandelbrot set rotate as the exponent is increased. Technically, this is not a hypercomplex fractal, but it’s still worth mentioning here.

Here is some Mathematica code:
(* runtime: 49 seconds, increase n for higher resolution *)
n = 100; Mandelbrot[n_, zc_] := Module[{z = 0, i = 0}, While[i <12 && Abs[z] < 2, z = z^n + zc; i++]; i];
image = Table[y = 1.5; While[y >= 0 && Mandelbrot[z, x + I y] < 12, y -= 3/n]; y, {z, 1, 4, 3/n}, {x, -2, 1, 3/n}];
ListDensityPlot[image, Mesh -> False, Frame -> False, PlotRange -> {0, 1.5}]

06
Jul
09

4D Julibrot Set

The complex Julia set is typically calculated in 2D with a constant complex seed value. However, if you consider the set of all possible Julia sets (all possible seed values), you get the complete 4D Julibrot set. The Mandelbrot set is contained as a 2D slice of the 4D Julibrot set. You can also take 3D slices of the 4D Julibrot set as shown here. The left picture shows what the Mandelbrot set looks like if you vary the real part of the starting value along the third dimension and the right picture shows what it looks like when you vary the imaginary part. Technically, this is not a hypercomplex fractal, but it’s still worth mentioning here.

Here is some Mathematica code:
(* runtime: 18 seconds, increase n for higher resolution *)
n = 100; Julibrot[z0_, zc_] := Module[{z = z0, i = 0}, While[i <12 && Abs[z] < 2, z = z^2 + zc; i++]; i];
image = Table[z = 1.5; While[z >= 0 && Julibrot[z, x + I y] < 12, z -= 3/n]; z, {y, -1.5, 1.5, 3/n}, {x, -2, 1, 3/n}];
ListDensityPlot[image, Mesh -> False, Frame -> False,PlotRange -> {0, 1.5}]

Links




Welcome !

You will find here some of my favorite hobbies and interests, especially science and art.

I hope you enjoy it!

Subscribe to the RSS feed to stay informed when I publish something new here.

I would love to hear from you! Please feel free to send me an email : bugman123-at-gmail-dot-com

Archives

Blog Stats

  • 545,497 hits