8 comments

[ 3.6 ms ] story [ 19.8 ms ] thread
As I left it going the particles seemed to be accelerating. I think this is because the acceleration term is proportional to the distance, rather than the usual 1/(distance)^2
Take a look at the code again, specially lines 180 - 188. You'll see that the velocity is varying proportional to the distance, not the acceleration.
(comment deleted)
much faster in chrome than FF
This is so trivial. Why is it on the front page?
all those triangles look kinda cool. i guess.
Had some fun messing with the variables for number of particles, acceleration and other things. There are some interesting patterns (kinda like interference patterns) if you make the acceleration large (change the denominator from 2000 to around 10). The code itself isn't that interesting, except to the extent that modern JS engines can keep up with a brute force update of 200x200 particles at almost 60fps.