xxxxxxxxxx
32
let angle = 0
let diameter = 300
let pointCount = 6;
function setup(){
createCanvas(500, 500)
background("#efefef")
}
function draw(){
stroke('black')
strokeWeight(15)
noFill()
circle(width / 2, height / 2, diameter)
stroke('red')
strokeWeight(25)
for(let i = angle; i < radians(360 + angle) ; i += radians(360 / pointCount) ){
let x = diameter / 2 * Math.cos(i) + width / 2;
let y = diameter / 2 * Math.sin(i) + height / 2;
point(x, y)
}
}