05
Jul
09

3D Mandelbrot / Mandelbar Set

{x,y,z}2 = {x2-y2-z2, 2xy, -2xz}
This method combines the Mandelbrot set with the Mandelbar set (Tricorn). Here is some Mathematica code:
(* runtime: 1.2 minutes, increase n for higher resolution *)
n = 100; Norm[x_] := x.x; Square[{x_, y_, z_}] := {x^2 - y^2 - z^2, 2x y, -2x z};
Mandelbrot[pc_] := Module[{p = {0, 0, 0}, i = 0}, While[i < 40 &&Norm[p] < 4, p = Square[p] + pc; i++]; i];
image = Table[z = 1; While[z >= -0.1 && Mandelbrot[{x, y, z}] < 40, 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, 1}]

Links

global Illumination, imax=21

Volumetric, imax=21

Here is one of my favorites. This is the largest of the miniature Mandelbrot sets for this fractal. It looks like a space ship with a radar gun. Here is some Mathematica code:
(* runtime: * minutes *)
n = 100; Norm[x_] := x.x; Square[{x_, y_, z_}] := {x^2 - y^2 - z^2, 2x y, -2x z};
Mandelbrot[pc_] := Module[{p = {0, 0, 0}, i = 0}, While[i < 20 &&Norm[p] < 4, p = Square[p] + pc; i++]; i];
image = Table[y = 0.04; While[y >= 0 && Mandelbrot[{x, y, z}] < 20, y -= 0.08/n]; If[y < 0, -0.06, y], {z, -0.04, 0.04, 0.08/n}, {x, -1.8, -1.72, 0.08/n}]; ListDensityPlot[image, Mesh -> False,Frame -> False, PlotRange -> {-0.02, 0.04}]

Advertisements

0 Responses to “3D Mandelbrot / Mandelbar 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

  • 545,497 hits

%d bloggers like this: