xxxxxxxxxx
/*
2025/01/05
#genuary2025
Isometric Art (No vanishing points).
*/
let t = 0.0;
let vel = 0.2;
let num;
let palette_selected;
function setup() {
createCanvas(800, 800, WEBGL);
pixelDensity(2)
rectMode(CENTER)
angleMode(DEGREES);
num = random(100000);
palette_selected = random(palettes);
}
function draw() {
randomSeed(num);
background(randomCol());
push();
translate(-width / 2, -height / 2)
ortho()
rotateX(-35)
rotateY(45)
tile();
pop();
t+=vel;
}
function randomCol() {
let randoms = int(random(1, palette_selected.length));
return color(palette_selected[randoms]);
}
function tile() {
let count = 10;
let w = width / count;
for (var k = 0; k < count; k++) {
for (var j = 0; j < count; j++) {
let xmove = w*sin(t+random(-100,100))
let ymove = w*cos(t+random(-100,100))
let zmove = w*sin(t+random(-100,100))
for (var i = 0; i < count; i++) {
let col = color(randomCol())
col.setAlpha(random(255))
fill(col)
stroke(randomCol())
push();
translate(i * w, j * w, k * w);
if (random() < 0.1) {
box(w * random(0.3, 1)+xmove, w * random(0.3, 1)+ymove, w * random(0.3, 1)+zmove)
push();
noFill();
stroke(randomCol())
box(w * random(0.3, 1)+xmove, w * random(0.3, 1)+ymove, w * random(0.3, 1)+zmove)
pop();
}
pop();
}
}
}
}