Naoto
Naoto Naoto Hieda

Tweet P5 Particle Study 48

t=[],N=0,M=200,draw=a=>{if(!N)for(createCanvas(W=400,W);N<99;N++)t[N]=[4*N,0,W-4*N,W,sin(f=N**.5)*M+M,cos(f)*M+M,0];t.find(N=>{t.find(([,,,,f,t])=>{b=1+mag(x=f-N[4],y=t-N[5])**2,N[1]+=x/b,N[6]+=y/b}),u=N[1]/=2,v=N[6]/=2,stroke(N),circle(N[4]+=u,N[5]+=v,5)})};//#つぶやきProcessing

comments powered by Disqus