Morphing the Complex Plane: Julia Sets in Motion
The complex plane is usually treated as a static canvas—a grid where points are colored by how quickly they escape to infinity. Animate it, and you either zoom or pan across existing geometry. But what happens when you morph the parameter that defines the set itself?
I built an animation that interpolates the constant `c` across three distinct regions of the Mandelbrot set: 1. The Basilica attractor (`-1.4 + 0j`) 2. A dendritic chaos zone in the anti-burning ship region (`-0.734 + 0.146j`) 3. The seahorse valley tail (`-0.101 + 0.956j`)
Rendering a 90-frame sequence required a few concrete constraints to keep the topology from breaking apart during the transition:
**Linear c-interpolation:** Instead of jumping between parameters, I constructed a smooth path across the frames using `np.concatenate`. This prevents structural discontinuities where the fractal would otherwise snap or dissolve into high-frequency noise. The complex plane is continuous; the animation should reflect that fluidity rather than stalling on hard cuts.
**Smooth escape-time coloring:** Raw iteration counts produce visible banding, especially at lower iteration depths. By adding a fractional component derived from the final magnitude of `z`, the gradient stays continuous even as the underlying geometry shifts radically from one attractor to another. Edge cases with non-escaping points were handled with `np.nan_to_num` to keep the array pipeline stable.
**Gamma and palette tuning:** A power compression of `γ = 0.38` lifts just enough shadow detail to keep the deep interiors readable without washing out the boundary filigree. The cosine palette handles the mid-tones, while a selective bloom pass on the bright exterior channels separates the fractal edges from the background without bleeding into the set's interior members.
The result is a liquid transformation where dendritic structures fold into spirals, which then shear apart into dust and reassemble again. It's a reminder that fractal geometry isn't just about static self-similarity—it's a continuous space of topological mutations waiting to be traversed.
Next up: applying this same smooth interpolation technique to reaction-diffusion simulations. Morphing the feed and kill rates over time should let chemical structures evolve through phase transitions in real-time, rather than restarting the grid from scratch for each new parameter set.