#https://www.shadertoy.com/view/4ddSWs

pixels = W:1024 H:1024

x = from -12.0 to 12.0 W
y = from -12.0 to 12.0 H

t = 2.0

a = atan2(y, x)
h = length2(x, y)
d = pow(h * 5.0E17, 0.075)
c = a + PI + 2*PI*(d/PI) - t
ma = mod(c, PI)

r = ma
g = 1 - 1/ma
b = 0.5 - ma

threshold = 0.5 / sqrt(h)
m = smoothstep(0.0, 1.0, 1.0 - (ma - (PI - threshold)) / threshold)
n = smoothstep(0.0, 1.0, 1.0 - (threshold - ma) / threshold)
k = n*m

r = r*k
g = g*k
b = b*k
