再帰であそぶ (2024/12/5)
https://gyazo.com/6b28bb671824658ddac6e15520afb462 https://gyazo.com/4edfdb34ca2bafe39030aaceb3585237 https://gyazo.com/12a807e8cde5c695958ce9c06fd24ccf
https://scrapbox.io/files/6751a87496050430e4da9296.mp4
code:processing
//#Processing
float t;
void setup() {
size(800, 800);
}
void draw() {
fill(-1, 7);
square(0, 0, 800);
stroke(-1);
a(400, 400, 200);
t+=.01;
}
void a(float x, float y, float d) {
if (d>5) {
push();
translate(x, y);
b(d, d, 2);
b(-d, d, 4);
b(d, -d, 6);
b(-d, -d, 8);
pop();
}
}
void b(float p, float q, float r) {
if (noise(p, q, t)<r/9) {
fill(r);
circle(p, q, abs(p));
a(p, q, abs(p)/2);
}
}