I think I solved it!

Animated slow mating of p=-1+0i with q=-0.122+0.75i via inverting the pullback, which gives a series of functions like (az^2+b)/(cz^2+d); starting from the pixel coordinates in equirectangular projection I compute the initial z and apply all the collected functions in reverse order, colouring white if the final output |z| > R for some large R.

Next step will be trying to draw the Julia sets in the halves of the sphere.

· · Web · 2 · 1 · 1

Didn't yet figure out how to draw the Julia sets in the halves.

Here's airplane (period 3 island, black) vs kokopelli (north period 4 island, white).

Code is about 300 lines of C99 (uses _Complex).

I might have the colours switched on that one, not sure. Using more colours would help diagnose the different periods.

I did one experiment with arg(z) and that eventually showed dynamics of components as they got pinched, but was very noisy near the equator, and wasn't consistent between adjacent frames (massive strobing).

I had two bugs that cancelled each other out. The test for hemispheres should be |z| > 1.

To draw the filled-in Julia sets, calculate w = R z or w = R / z depending on hemisphere, and iterate w = w^2 + c (choice of c is hemisphere dependent) until escape or maximum iterations reached. Count the previous (z^2+a)/(z^2+b) stuff in the iteration count too.

Colour unescaped pixel by hue = arg(z - a) where a = (1-sqrt(1-4c))/2 is a fixed point (center of multiple arms).

To draw filaments in the Julia sets themselves (not just the interior) I think I need to compute derivatives w.r.t. screen-space. I have some dual-complex-number library code ready to go.

Did try rotating the Riemann sphere so that the centers of the Julia sets are left and right in the frame instead of surrounding the top and bottom poles. But it didn't look as good, mainly because there was too much fine detail near the poles that got all smeary.

Sign in to participate in the conversation

Welcome to, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.