つぶやきProcessing (2025/7/16)
https://gyazo.com/69f6c1c892db32c531375352a94f3d38 https://gyazo.com/afc4685f990e51cffcc67c2ec4977f1c https://gyazo.com/9a073b75bd70ccced2a1297373442ab5
https://scrapbox.io/files/687755e3a445a3c40aa7dd44.mp4
https://x.com/hisadan/status/1945386079974301805
code:processing
//#つぶやきProcessing
float n=1, t, r;
void setup() {
size(800, 800);
}
void draw() {
background(0);
stroke(255, 255-t*2, 255-t*5, 256-t*3);
translate(400, 400);
for (r=0; r<TAU; r+=PI/n)
line(n*sin(r*t), n*cos(r*t), (400-n)*sin(r), (400-n)*cos(r));
t+=.05;
n+=.5;
}
上のソースを小改造。ただし投稿用の動画にするとビットレートの問題で映像が荒すぎるので投稿はせず。ちなみにビットレート指定無しだと100Mにもなったのでここには静止画しか貼らないことにする。自分のPCで動かすのが吉。
https://gyazo.com/436425a16cc7de0fd0282a3fe722c97d https://gyazo.com/40863117ab224759304426c2ad617e01 https://gyazo.com/3c92cb1473de31f880eaf5945784763d
code:processing
//#つぶやきProcessing
float n=68, t=13.4, r, x, y, q;
void setup() {
size(720, 720);
}
void draw() {
background(0);
stroke(-1, 256-t*4);
for (r=0; r<TAU; r+=PI/n) {
for (x=1; x<4; x+=2) {
for (y=1; y<4; y+=2) {
line(c(n*sin(q=r*t*(x+y*4)))+x*180, c(n*cos(q))+y*180, c((360-n)*sin(r))+x*180, c((360-n)*cos(r))+y*180);
}
}
}
t+=.04;
n+=.2;
}
float c(float p) {
return(constrain(p, -180, 180));
}