let angle = 0, angle2 = 0;
let resolution = 40;
let r = 150;
let xAngle = 0;
let heightColumn = 10;
function setup() {
createCanvas(400, 400, WEBGL);
frameRate(5);
}
function draw() {
background(255);
orbitControl();
for(let j = 0; j < resolution-5; j++){
for(let i = 0; i < resolution; i++){
let x = r * sin(angle) * cos(angle2);
let y = r * sin(angle) * sin(angle2);
let z = r * cos(angle);
push()
translate(x,y);
sphere(10);
pop()
angle+=TWO_PI/resolution;
}
angle2+=PI/resolution;
}
}