xxxxxxxxxx
44
let angle = 0;
let diameter = 300;
let pointCount = 6;
let i = 0;
function setup() {
createCanvas(window.innerWidth, window.innerHeight);
background("black");
}
function draw() {
translate(width / 2, height / 2);
stroke("white");
for (
let i = angle;
i < radians(360 + angle);
i += radians(360 / pointCount)
) {
rotate(Math.random(PI / 3.0, i))
let x = (diameter / 0.5) * Math.cos(i) + width / 2;
let y = (diameter / 2) * Math.sin(i) + height / 2;
rotate(Math.random(x, i))
push()
point(x, y);
pop()
push()
stroke("orange");
line(125, i, i, 250)
pop()
}
}