Inigo Quilez   ::     ::  
In 2006 I experimented with 3D orbit traps for quaternion fractals for the first time. 2D Orbit Traps were very common in most fractal rendering software, but I believe nobody had done a 3D version back then, but I could be wrong of course. My experiments worked quite well, although at the time I was rendering them as a voxelized realtime point cloud, so the image quality wasn't than great - see the end of the article to get a look. These days we can get much prettier images of course:

Cylinder orbit traps in a Julia set (from the video "Geodes")

The idea is pretty much the same as the use of the 2D Orbit Traps algorithm, but in the context of SDF (signed distance field) rendering: as we iterate our point Z under the polynomial map, we track how its trajectory relates to some arbitrary geometrical figure that we choose. This trajectory is called an orbit, and one way to make the technique work is to track what's its closest encounter with the chosen geometrical shape. After the iterations are over, we use the distance to the shape during its closest encounter, and its smaller than some threshold we consider the source point a solid part of our scene. In that sense, the orbit gets "trapped" in the shape, hence the name, and the nature of the dynamics of the process makes the source shape that we chose to appear all over the domain following the same fractal structure as the Mandelberot or Julia set itself that we began with.

Cylinder orbit traps in a Julia set (from the video "Geodes")

In the context of raymarching SDFs, this distance to the geometrical shape with this fractal domain deformation can generate a pretty distorted distance metric, but as usual dividing by the gradient of the field or slowing down the raymarcher is one way to cope with it. In the future I'll try to extrat the exact analytical SDF for traps.

You have source code and a realtime demo here:

Plane orbit traps in a Julia set (from the video "Geodes")

The following are the images I rendered in 2006. They were computed beforehand and then rendered in realtime as poinclouds in OpenGL. The first image used cylinder traps, the second and third used sine wave traps, and the last one used a combination of cylinder and sphere traps.