= 0; var dx = 100; var dy = 0; var s = 150; context.beginPath(); context.translate(100,150); var x = Math.sin(0); var y = Math.cos(0); var dig = Math.PI / 5 * 4; for(var i = 0; i { var x = Math.sin(i * dig); var y = Math.cos(i * dig); context.lineTo( dx x * s,dy y * s); } context.clip(); }