マンデルブロ集合3D化アレンジ (2026/4/5)
https://gyazo.com/c971ee861a6e5ab967a603dbe9aec46e https://gyazo.com/af8234c38ef475cb6305f351f21572fa https://gyazo.com/e3697493b5e00be9440266b4d5ec26ad
https://scrapbox.io/files/69d26f833caed06dfe674591.mp4
https://x.com/hisadan/status/2040795710489264215
https://x.com/hisadan/status/2040795713756660142
これ つぶやきProcessing (2021/9/30) とか、これ Mandel Blaster! (2024/6/16) をアレンジ。
Mandelbrot Setで変えられそうなパラメータを適当にいじっただけなので、新しいものが作り出せているわけではない…。
code:processing
//#Processing
float r, i, a, b, t, x, y, p=PI/4;
int n;
void setup() {
size(600, 600, P3D);
}
void draw() {
background(0);
camera(0, 0, 400, 400, 400, 0, 0, 0, -1);
for (x=-600; x<400; x++)for (y=-500; y<500; y++) {
r=i=n=0;
a=x/300;
b=y/300;
while ((r*r+i*i<4)&&n<255) {
t=sqrt(2)*cos(p)*(r*r-i*i)+a;
i=2*r*i+b;
r=t;
n++;
}
stroke(t*99, i*99, n, 255-mag(x+99, y)/2);
point(x+600, y+400, t*i*n/9);
}
p+=.01;
}