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

pixels = W:1024 H:1024

x = from 0 to 1 W
y = from 4 to 0 H

n = 2
r = 0.5 - 0.5*cos(fract(y)*PI)
s = pow(n, floor(y))
w = fract(x*s) - 0.5

xx = w*n/r + n/2
ss = n*s/r/100

a = if( abs(w/r) > 0.5, xx, fract(xx) )
k = min(1, abs(a  - 0.5)/ss)

r = k
g = k
b = k
