Distance and slope: shading with a derivative
Escape time tells you when an orbit left; it says nothing about the geometry it left behind. But the renderer can also track how fast the orbit responds to a nudge in — its derivative. Differentiate the rule with respect to and the chain rule hands you a second recurrence to run alongside the first:
(in the Julia plane, differentiate with respect to instead: the same recurrence without the , seeded ). One extra multiply-add per step — almost free — and two more ways of seeing open up. Same view, three treatments:

Smooth colouring is the baseline from the escape-time chapter: palette by fractional escape count, nothing else.

Distance estimation combines the orbit's final size with that derivative into an estimate of the distance from the pixel to the set itself:
The intuition: measures how far along the escape the orbit is, and dividing by converts that to distance in the -plane — where the derivative is huge, a tiny step in swings the orbit wildly, so the boundary must be close. Classical function theory (the Koebe distortion theorem) makes this honest: the estimate is correct up to a small constant factor — near the set it never lies by more than about 4×, so darkening pixels by inks the boundary like an etching. Filaments far too thin for any escape-time palette to resolve become crisp lines. This is the mode that shows you where the set actually is.
Its limitation is inherited from the families chapter: the formula needs a complex derivative. For the non-analytic families (Burning Ship, Tricorn, Celtic, Phoenix), Mandala carries the analytic degree factor as an approximation for a useful boundary-highlight aesthetic; it does not pretend that the conformal-distance guarantee survives the folds.

Slope shading reads the same derivative as terrain. Treat the smooth escape count as a height field over the plane; its gradient — assembled from and , no extra iteration needed — gives a surface normal, and lighting that normal from a chosen angle turns the exterior into relief, like a raking-light photograph of a carved surface.
In the implementation the complex direction is normalised to , then a Lambert-like term controls brightness:
is the chosen light direction and is the ambient-height term: raising flattens the relief; lowering it deepens the shadow side.
Details that keep it honest
The interior stays solid black in every mode — Mandala never invents structure where the mathematics says "bounded". Distance shading converts from complex units to screen pixels before applying its ramp, so a one-pixel line remains visually one pixel wide as you zoom. Width, falloff and an invert option control whether the boundary becomes dark ink or a bright glowing line. Slope exposes light angle and relief depth.
Both modes run on the GPU, CPU and double-double CPU tiers. At the extreme perturbation tier Mandala currently does not perturb the derivative; it passes a zero derivative and both modes degrade safely to ordinary smooth colouring. Newton and Nova also bypass exterior shading because their basin/ hybrid colour paths are not escape-distance fields. Exports preserve whichever supported treatment is actually visible on screen.