var canvas = getCanvas();
function randomInRange(min, max) {
return min + Math.random() * (max-min);
}
var centreX = 200;
var centreY = 200;
var minDistance = 40;
var maxDistance = 60;
var distance = 50;
canvas.setColor(Color(90, 10, 40, 255));
canvas.setLineWidth(5);
canvas.beginPath();
canvas.moveTo(centreX, centreY + 50);
for(var angle = 0; angle < 360; angle += randomInRange(15, 25)) {
var x = centreX + Math.sin(Math.toRadians(angle)) * distance;
var y = centreY + Math.cos(Math.toRadians(angle)) * distance;
canvas.lineTo(x, y);
distance = randomInRange(40, 60);
}
canvas.closePath();
canvas.fillPath();
canvas.setColor(Color(0, 0, 0, 255));
canvas.drawPath();