振動 (2024/11/8)
https://gyazo.com/b6eb05dfc41edb01a467e8de17b0cb1d https://gyazo.com/9b41c68118e5e5322ea8863eb34501b6 https://gyazo.com/119be7ec97ee4ff30025de2a03efb605
https://scrapbox.io/files/672ced02c75ee9ec87445d42.mp4
code:processing
//#Processing
int n=20, i, s;
float a[]=new floatn*2, d, t, x, y, p, q; void setup() {
size(800, 800);
for (i=0; i<n*2; )ai++=400-random(800); }
void draw() {
background(0);
translate(400, 400);
for (i=0; i<n; i++) {
x=0;
y=0;
for (s=0; s<n; s++) {
if (i!=s) {
if (d<200+99*cos(t)) {
x-=p;
y-=q;
} else {
x+=p;
y+=q;
}
stroke(255-d/2, d/2, d/2, 50);
}
}
}
t+=PI/100;
}