xxxxxxxxxx
23
function setup() {
createCanvas(400, 400);
background(220);
rectMode(CENTER);
ellipseMode(CENTER);
fill(0, 0, 255);
rect(200, 200, 400, 400);
fill(255, 0, 0);
ellipse(200, 200, 400, 400);
for(let i = 0; i < 100; i++) {
strokeWeight(5);
stroke(255);
let pos = createVector(random(width), random(height));
point(pos);
if (dist(pos.x, pos.y, 200, 200) < 300) {
print("RED");
}
}
}