xxxxxxxxxx
21
const r = 200;
function setup() {
createCanvas(600, 600, WEBGL);
}
function draw() {
background(220);
push();
fill(255, 100, 0, 100);
noStroke();
sphere(r);
pop();
push();
let x = r*0.5;
let y = r*0.5;
let z = sqrt(r*r-x*x-y*y);
translate(x,y,z);
sphere(2);
}