scale=5,size=9,padding=scale+5,tile=scale*size+padding,s=1232;function n(){return x=1e4*Math.sin(s++),0.5<x-Math.floor(x)}function m(){return n()?"#440":n()?"#330":"#000"}function o(){return n()?"#ffd700":"#eec600"}function gr(){for(h=[],color1=m(),color2=m(),color3=m(),i=0;i<size*size;i++)color=n()?color1:color3,color=n()?color:color2,h[i]=n()?color:0;for(x=0;x<size;x++)for(y=0;y<size/2;y++)h[x+y*size]=h[x+(size-1-y)*size]}function di(){for(gr(),c.fillStyle=o(),c.beginPath(),t=tile/2,c.arc(px+t-3,py+t-3,t-6,0,2*Math.PI),c.fill(),c.strokeStyle=m(),c.beginPath(),c.lineWidth=3,c.arc(px+t-3,py+t-3,t-2,0,2*Math.PI),c.stroke(),x=0;x<size;x++)for(y=0;y<size;y++)i=h[x*size+y],c.fillStyle=i,sc=scale-2,i&&c.fillRect(px+t/8+x*sc+t/4,py+t/8+y*sc+t/4,sc+1,sc+1)}for(c.fillStyle="#000",c.fillRect(0,0,a.width,a.height),px=0;px<a.width;px+=tile)for(py=0;py<a.height;py+=tile)di();
scale = 5;
size = 9;
padding = scale+5;
tile = scale*size+padding;
s=1232;
function n(){
x = Math.sin(s++) * 10000;
return x - Math.floor(x)>0.5;
}
function m(){
return n() ? "#440" : n() ? "#330" : "#000";
}
function o(){
return n() ? "#ffd700": "#eec600";
}
function gr(){
h = [];
color1 = m();
color2 = m();
color3 = m();
for(i = 0; i<size*size; i++){
color = n() ? color1 : color3;
color = n() ? color : color2;
h[i] = n() ? color: 0;
}
for(x=0; x<size; x++)for(y=0; y<size/2; y++){
h[x+y*size] = h[x+(size-1-y)*size];
}
}
function di(){
gr();
c.fillStyle = o();
c.beginPath();
t=tile/2;
c.arc(px+t-3,py+t-3, t-6,0,2*Math.PI);
c.fill();
c.strokeStyle = m();
c.beginPath();
c.lineWidth=3;
c.arc(px+t-3,py+t-3, t-2,0,2*Math.PI);
c.stroke();
for(x=0; x<size; x++)for(y=0; y<size; y++){
i = h[x*size+y];
c.fillStyle = i;
sc=scale-2;
if(i)
c.fillRect(px+t/8+x*sc +t/4, (py+t/8)+y*sc +t/4, sc+1, sc+1);
}
}
c.fillStyle = "#000";
c.fillRect(0,0,a.width, a.height);
for(px = 0; px<a.width; px+=tile)for(py = 0; py<a.height; py+=tile)
di();