vec3 hsv(float h, float s, float v)
{
  vec4 t = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
  vec3 p = abs(fract(vec3(h) + t.xyz) * 6.0 - vec3(t.w));
  return v * mix(vec3(t.x), clamp(p - vec3(t.x), 0.0, 1.0), s);
}
mat2 rotate2D(float r)
{
  return mat2(cos(r), sin(r), -sin(r), cos(r));
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
  vec2 r = iResolution.xy;
  float t = iTime;
  float f =float(iFrame);
  vec4 o = vec4(0.0);
  vec3 p = vec3(0.0);
  float i=0.0,g=0.0,e=0.0,R=0.0,S=0.0;
  for(i;i++<1e2; o.rgb += hsv(.4-.02/R,(e=max(e*R*1e4,.7)),.03/exp(e)))
  {
    S=1.;
    vec3 p=vec3((fragCoord.xy/r-.5)*g,g-.3)-i/2e5;
    p.yz*=rotate2D(.3);
    for(p=vec3(log(R=length(p))-t,e=asin(-p.z/R)-.1/R,atan(p.x,p.y)*3.);S<1e2;S+=S)
      e+=pow(abs(dot(sin(p.yxz*S),cos(p*S))),.2)/S;
    g+=e*R*.1;
  }
  fragColor = o;
}
