• Color Cloths

    
    var d=1024,
    s=3/(y+99),
    p=(y+Math.sin((x*x+(y-700)^2)/100/d)*35)*s;
    r=(parseInt((x+d)*s+p)%2+parseInt((d*2-x)*s+p)%2)*127;
    g=(parseInt(5*((x+d)*s+p))%2+parseInt(5*((d*2-x)*s+p))%2)*127;
    b=(parseInt(5*((x+d)*s+p))%2+parseInt(29*((d*2-x)*s+p))%2)*127;
                    
  • Random

    
    if(x==0&&y==0){kr=kg=kb=0;}
    var l;
    kr+=Math.random();
    l=parseInt(kr)%512;
    r=l>255?511-l:l;
    kg+=Math.random();
    l=parseInt(kg)%512;
    g=l>255?511-l:l;
    kb+=Math.random();
    l=parseInt(kb)%512;
    b=l>255?511-l:l;
                    
  • Mandelbrot 2

    
    var a=0,b=0,d,n=0;
    for(;a*a+(d=b*b)<4&&n++<8192;b=2*a*b+y/5e4+.06,a=a*a-d+x/5e4+.34);
    r=n/4;
    g=2*r;
    b=4*r;
                    
  • Mandelbrot 1

    
    var a=0,b=0,n=0,c,d,f=8e-9;
    while((c=a*a)+(d=b*b)<4&&n++<880){b=2*a*b+y*f-.645411;a=c-d+x*f+.356888;}
    r=255*Math.pow((n-80)/800,3);
    g=255*Math.pow((n-80)/800,.7);
    b=255*Math.pow((n-80)/800,.5);
                    
  • 太极阴阳图

    
    if(typeof f_c=="undefined"){f_c=function(x,y,px,py,r){return Math.sqrt(Math.pow(x-px,2)+Math.pow(y-py,2))<=r;}}
    
    var x0=x-512,y0=512-y;
    r=g=b=127;
    
    if(f_c(x0,y0,0,0,256)){r=g=b=(x0>0)?0:255;}
    
    if(f_c(x0,y0,0,128,128)&&x0>0){r=g=b=255;}
    if(f_c(x0,y0,0,-128,128)&&x0<=0){r=g=b=0;}
    
    if(f_c(x0,y0,0,128,32)){r=g=b=0;}
    if(f_c(x0,y0,0,-128,32)){r=g=b=255;}