function drawStar(cxt, x, y, outerR, innerR, rot) {
cxt.beginPath();
for (var i = ; i < ; i++) {
cxt.lineTo(Math.cos((+i*-rot)/*Math.PI)*outerR+x,
-Math.sin((+i*-rot)/*Math.PI)*outerR+y);
cxt.lineTo(Math.cos(( + i * - rot) / * Math.PI) * innerR + x,
-Math.sin(( + i * - rot) / * Math.PI) * innerR + y);
}
cxt.closePath(); cxt.fillStyle = "#fb3";
cxt.strokeStyle = "#fd5";
cxt.lineWidth = ;
cxt.lineJoin = "rount"; cxt.fill();
cxt.stroke();
}
function draw() {
for (var i = ; i < ; i++) {
var r = Math.random() * + ;
var x = Math.random() * cvs.width;
var y = Math.random() * cvs.height;
var a = Math.random() * ;
drawStar(context, x, y, r, r / 2.0, a);
}
}