# Sphractals Here are some cool fractals displayed on a sphere using polar coordinates.

This first group of 4 images is of the same fractal pattern ( Mandelbrot 1 ), as the camera zooms in on the sphere. Click here to view the 3D presentation of this pattern. ( Note: at the bottom-left of the presentation are two checkboxes. The bottom checkbox enables you to turn on a black plane that bisects the sphere, thus covering up the far side, making it easier to see details in the near side. The plane is turned off by default so you see the entire sphere. )

Here’s another pattern ( Julia ). Click here to see the 3D presentation.

Here’s one called Serpinski, because it displays the Sierpinski triangle <- wikipedia. Click to see 3D presentation.

There are lots more possibilities for patterns, probably infinite, but here’s one last one that I like, called Fractball because it looks sort of like the stitching on a baseball.

And if you’re curious here’s the essence of the code that creates these patterns:

```var theta : Number;
var phi : Number;

for( i:int = 0; i < 10000; i++ ) {
var rnd	: Number = Math.random();
var angle : Number = 4 * Math.PI;
if( rnd < 0.33 ) {
theta	 	= theta / divisor;
phi		= phi / divisor;
} else if( rnd < 0.66 ) {
theta		= ( angle - theta ) / divisor;
phi		= ( angle - phi ) / divisor;
} else {
theta		= ( angle - theta ) / divisor;
phi		= ( angle + phi ) / divisor;
}
}```

Here are a few additional presentations:

Deathstar

Fractball2

Kosh2

MachinePlanet1

MachinePlanet2

Mandelbrot2

Mandelbrot3

## One thought on “Sphractals”

1.  mikeciz says:

Wow, that’s really cool. Love the Deathstar one! Good to see you messing around with AS3 again.