// phyllotaxis adapted from https://www.shadertoy.com/view/MsdGz7 by FabriceNeyret2
// music by EnigmaCurry - www.enigmacurry.com
 
void mainImage( out vec4 O, vec2 I )
{
	vec2 R = iResolution.xy;
    float t = iTime/64.;
    float zoom = tan(t/3.) * 3. + 15.;
    I = zoom *(((I+I)-R)/2.)/R.y;
    

    float c = smoothstep(-142.,142.0,(sin(t) + 1.)),
        cpow = (sin(iTime/112.)*2.0+2.0) + 0.001;
    I = vec2(0., length(I)) + atan(I.y+112.,I.x-112.)/pow(c/2.,c*cos(t)*cpow+cpow);
    I.x = ceil(I.y) - I.x;
    I.x *= I.x * (sin(iTime/154.)) * 0.0472;                     
    I.x *= (sqrt(5.)-1.)*2.;
    
    O = texture(iChannel0,fract(I));
}
