function sample(){ paint(); } function paint(){ var sub=new svgpaint(); str="<svg width=\"500\" height=\"500\">"; for (s = 1; s < 250; s++) { for (sx = 0; sx < 360; sx++) { x1 = 250 + s * Math.cos(sx * Math.PI / 180); y1 = 250 + s * Math.sin(sx * Math.PI / 180); str = str + sub.rect(x1, 500 - y1, 1, 1, "red"); } } str=str+"</svg>"; $("#memo").html(str); }