In regards to fractals, orbit traps give a new way to render images. As a fractal is created each pixel of the image is calculated by repeating (iterating) a formula over and over. In the case of the Mandelbrot Set the formula is z=z^2+c. As each iteration happens if you follow or plot the path the complex number z takes at each step you can see the “orbit” the point takes.

Here is a nice movie by bryceguy72 that shows the general idea of orbit traps. As the initial point on the Mandelbrot Set is changed you can see the path the iteration takes.

The orbit traps themselves are shapes within the complex plane. If the iterating set of points hits this shape then it is “trapped” and the pixel is then colored depending on how close it is to the trap. Not that easy to explain to someone who does not understand the maths involved (and no doubt if you read the above and are not into math then you have a “what the!?” expression now).

Here is the famous Mandelbrot Set.

If the “cross” orbit trap is applied you get an image like the following.

The main centered white cross shape is the main trap. Any time the orbit of a pixel hits within the cross shape it stops iterating and is shaded based on its location within the trap. If only the trap shape is displayed the result is like this image.

There are numerous styles and types of orbit traps out there. Here is another sample of the above Mandelbrot Set rendered with the “stalks” orbit trap.

When you zoom into these orbit trap images you get some more interesting results.

After expanding the root-finding fractals mode in Visions Of Chaos I have now added the ability to render orbit traps within them. The results are as interesting or more interesting than the Mandelbrot orbit trap images. Here are a few example images.

Here is a zoom into the above Newton Fractal using the cross orbit trap and shaded with Perlin Noise.

Even though the movie has a semi 3D appearance of going through a forest of fractal tree trunks the frames are pure 2D. It is the orbit traps that give it the 3D look.

There are many more styles of orbit traps to use and I will no doubt be playing and experimenting with new varieties for years to come.

Excellent article and nice examples. I’ve been studying fractals for some time now and I’m just starting to get into orbit traps; you had some good information for beginners. Could you include images or formulas for the basic shapes used for the orbit traps (such as “the cross is .1 units thick/wide, parallel to the x-axis with the intersection at the origin”)? I’m especially interested in the “stalks” shape and the traps on convergent fractals because I haven’t found any good information on it elsewhere on the net. Any pointers would be greatly appreciated.

if (abs(z.x)<trapsize) then
begin
trapdist:=abs(z.x);
trapped:=true;
end
else
if (abs(z.y)<trapsize) then
begin
trapdist:=abs(z.y);
trapped:=true;
end;

z.x and z.y and the complex number real and imaginary components. Once trapped, you stop iterating and shade depending on how close the point was to the trap. ie (trapdist/trapsize*255) for rgb color intensity.

For the stalks trap.

Initialise stalksradius:=0.1;

Then during each iteration…

if (sqrt(sqr(z.y)+sqr(z.x))=stalksradiuslow) and (iters>1) then
begin
ztot:=sqrt(ztot)+(1-abs(sqrt(sqr(z.y)+sqr(z.x))-sqrt(sqr(cx)+sqr(cy)))/stalksradius);
trapped:=true;
end;

Then index the color palette shade by 255-trunc(sqrt(ztot)*256);

Excellent article and nice examples. I’ve been studying fractals for some time now and I’m just starting to get into orbit traps; you had some good information for beginners. Could you include images or formulas for the basic shapes used for the orbit traps (such as “the cross is .1 units thick/wide, parallel to the x-axis with the intersection at the origin”)? I’m especially interested in the “stalks” shape and the traps on convergent fractals because I haven’t found any good information on it elsewhere on the net. Any pointers would be greatly appreciated.

OK, here is some code that should (?) help.

For the cross.

Initialise the trapsize:=0.05;

Then during each iteration

if (abs(z.x)<trapsize) then

begin

trapdist:=abs(z.x);

trapped:=true;

end

else

if (abs(z.y)<trapsize) then

begin

trapdist:=abs(z.y);

trapped:=true;

end;

z.x and z.y and the complex number real and imaginary components. Once trapped, you stop iterating and shade depending on how close the point was to the trap. ie (trapdist/trapsize*255) for rgb color intensity.

For the stalks trap.

Initialise stalksradius:=0.1;

Then during each iteration…

if (sqrt(sqr(z.y)+sqr(z.x))=stalksradiuslow) and (iters>1) then

begin

ztot:=sqrt(ztot)+(1-abs(sqrt(sqr(z.y)+sqr(z.x))-sqrt(sqr(cx)+sqr(cy)))/stalksradius);

trapped:=true;

end;

Then index the color palette shade by 255-trunc(sqrt(ztot)*256);

Hope that helps you out.

Jason.