xxxxxxxxxx
let a = 0
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
background(100);
}
function draw() {
orbitControl()
background(100)
translate(0, 0, -500)
angleMode(DEGREES)
noStroke()
pointLight(255, 200, 255, 0, -1500, -2000)
pointLight(50, 100, 100, 1000, -150, 2000)
pointLight(50, 100, 0, -100, -5000, 5000)
rotateX(45)
specularMaterial(255, 255, 255)
//plane(width*200, height*200)
for (i = 0; i < 10; i++) {
let inc = i*10
shininess(10 + i*3)
push()
translate(i, i, map(sin(a/(1 + i)), -1, 1, -1000, -50 + inc*10))
ellipsoid(width/2 - inc * (i/1.5), width/2 - inc * (i/1.5), 100 + map(sin(a/(i + 1)), -1, 1, 0, inc*2))
pop()
a++
}
}