The ray casting can be broken down into two distinct parts. The first involves finding the distance to the fractal for each image point. The second colors the points appropriately using an environment map.