Loading video...

Video Failed to Load

Go Home

//#Processing int n=999,i,s; float a[]=new float[n*2],x,y,e,f,d,k=400; void setup(){ size(800,800); for(i=0;i<n*2;i++)a[i]=random(-k,k);} void draw(){ noStroke(); fill(0,9);square(0,0,800); translate(k,k); fill(-1); for(i=1;i<n;i++){ x=0;y=0; for(s=1;s<n;s++){ if(i!=s){ //cont.

31,571 views • 1 year ago •via X (Twitter)

9 Comments

ひさだん's profile picture
ひさだん1 year ago

//cont. d=dist(a[i],a[i+n],a[s],a[s+n]); e=(a[s]-a[i])/d/d; f=(a[s+n]-a[i+n])/d/d; x+=d<50?-9*e:e;y+=d<50?-9*f:f; }} d=dist(a[i],a[i+n],a[0],a[n]); a[i]+=x-200*(a[0]-a[i])/d/d; a[i+n]+=y-200*(a[n]-a[i+n])/d/d; circle(a[i]*=abs(a[i])>k?-1:1,a[i+n]*=abs(a[i+n])>k?-1:1,5); } //cont.

ひさだん's profile picture
ひさだん1 year ago

//cont. fill(#FF0000); circle(a[0]+=(a[1]-a[0])/99,a[n]+=(a[n+1]-a[n])/99,30);}

EV3's profile picture
EV31 year ago

What a lovely boid

Csanád Temesvári's profile picture
Csanád Temesvári1 year ago

Just me and the boids hanging out

Adam S.'s profile picture
Adam S.1 year ago

It has a beauty of flow that is...( )

Cai's profile picture
Cai1 year ago

ひさだんさんこれわ美しいです!!

archeological's profile picture
archeological1 year ago

What program is it?

Gogen's profile picture
Gogen1 year ago

Spectacular organic wow 💎

Fate's profile picture
Fate1 year ago

Nice code! Looks like a pixel art magic trick in progress.

Related Videos