構造 (2024/10/31)
https://gyazo.com/ac346022f03bd6cd73b9f9499ea3ae79 https://gyazo.com/a27bd8abdb9b4bd264a9a589864ffa13 https://gyazo.com/758d6cd391f79f8040351f0bf79295a9
https://scrapbox.io/files/67238166493c1de847ab87ba.mp4
code:processing
//#Processing
float t;
void setup() {
size(800, 800, P3D);
}
void draw() {
background(0);
camera(400, 400, 400, 0, 0, 0, 0, 0, -1);
lights();
a(0, 0, 300);
t+=.01;
}
void a(float x, float y, float d) {
if (d>10) {
push();
translate(x, y);
rotateX(t);
rotateY(t);
if (d>20) {
stroke(-1);
strokeWeight(3);
noFill();
circle(0, 0, d);
} else {
noStroke();
fill(-1);
sphere(d/2);
}
float s=d*sin(t)/2;
a(s, s, d/2);
a(s, -s, d/2);
a(-s, s, d/2);
a(-s, -s, d/2);
pop();
}
}