#https://www.shadertoy.com/view/XddSD7

pixels = W:1024 H:1024

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

t = 3.31

rotation = sin(0.31 * t)
pelSize = (1.000001 - (cos(t * 0.23) * 0.5 + 0.5)) * 20.0
zoom = pelSize / 1024
zoomH = 0.5 * zoom

sinA = sin(rotation)
cosA = cos(rotation)
pntx = x * cosA - y * sinA - zoomH
pnty = y * cosA + x * sinA - zoomH
    
offsetU = floor((pntx + zoom) / zoom) * zoom
offsetV = floor((pnty + zoom) / zoom) * zoom

r = 0
g = 0
b = 0

[Loop Start:4
cx = 0.3 * sin(t * 0.13 + loop * 1.5707963267948966)
cy = 0.3 * cos(t * 0.17 + loop * 1.5707963267948966)
d = length2(cx - offsetU, cy - offsetV)
r = r + sin(d * (201.0)) * 1.0
g = g + sin(d * (167.0)) * 2.0
b = b + sin(d * (123.0)) * 4.0
Loop End]
