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

Advertisements

0 Responses to “4D “Roundy” Mandelbrot Set”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


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

  • 546,315 hits

%d bloggers like this: