<head>
<meta charset=utf-8 />
</head>
<body onload="draw();">
<canvas id="circle" width="500" height="500" style="border:1px solid grey"></canvas>
<script>
function draw()
{
let canvas = document.getElementById('circle');
let ctx = canvas.getContext('2d');
let X = canvas.width / 2;
let Y = canvas.height / 2;
for (let i = 0 ; i < 25;i++){
for (let k = 0 ; k < 25;k++){
R = Math.floor(Math.random()*5)+25;
ctx.arc(i*50,k*50, R, 0, 2 * Math.PI, false);
ctx.strokeStyle = '#FF0000';
ctx.stroke();
}
}
}
</script>
</body>
|