Hi, a bit of a silly question but I am rusty.
I have a program that is drawing points around a circle but I want them to draw all at once (without removing the background) – what am I forgetting?
let pts = 35;
let a = 0;
let inc, r;
function setup() {
createCanvas(windowWidth, windowHeight);
background(100);
inc = TWO_PI/pts;
r = 200;
}
function draw() {
background(100);
push();
translate(width/2, height/2);
for (let x = 0; x < pts; x++) {
for (let y = 0; y < pts; y++) {
let x2 = cos(a) * r;
let y2 = sin(a) * r;
ellipse(x2, y2, 5 , 5)
}
}
pop();
a = a + inc;
}