つぶやきProcessing その2 (2026/4/21)
https://gyazo.com/33452637ad0531222418780d495b278c https://gyazo.com/c570e0df805273808337d4d985fef59c https://gyazo.com/1a5abce85b58a8b55feef9f98de64d95
https://scrapbox.io/files/69e77e783caed06dfe09eccd.mp4
https://x.com/hisadan/status/2046584749175832639
ローレンツアトラクタ
code:processing
//#つぶやきProcessing
float x, y, p, q, a=1.86, b, i, t;
void setup() {
size(800, 800);
background(0);
}
void draw() {
stroke(-1);
fill(0, 20);
square(-1, -1, 802);
x=0.1;
y=0;
b=.7*cos(t);
for (i=0; i<60000; i++) {
p=a*x-x*y;
q=b*y+x*x;
point(p*180+400, q*180+200);
x=p;
y=q;
}
t+=PI/1000;
}