Archived Sketch

This sketch is created with an older version of Processing,
and doesn't work on browsers anymore.

View Source Code

Click Record or
press 'R' to save 3 secs of animation

Particle Simulation with KD Tree

by paul

Particle Simulation with KD Tree

by
Click and drag to interact with the particles. I've used a KD Tree algorithm to search for the nearest neighbour for each particle. This reduces the number of collision detections per frame down to 1 per particle. The KD-Tree algorithm has come from: http://thomasdiewald.com/blog/?p=1689. There is an old open processing sketch, which doesn't work with processing.js, here: http://www.openprocessing.org/sketch/92253 Working from the Processing.org 2.0 example 'CircleCollision' by Ira Greenberg, based on Keith Peter's solution in Foundation Actionscript Animation: Making Things Move!

Particle Simulation with KD Tree

Click and drag to interact with the particles. I've used a KD Tree algorithm to search for the nearest neighbour for each particle. This reduces the number of collision detections per frame down to 1 per particle. The KD-Tree algorithm has come from: http://thomasdiewald.com/blog/?p=1689. There is an old open processing sketch, which doesn't work with processing.js, here: http://www.openprocessing.org/sketch/92253 Working from the Processing.org 2.0 example 'CircleCollision' by Ira Greenberg, based on Keith Peter's solution in Foundation Actionscript Animation: Making Things Move!
eg. "mouse, keyboard"
eg. "visualization, fractal, mouse"
learn more about Creative Commons
won't be published on feeds but still accessible on your profile
won't be accessible by anyone
source code won't be available on the page, however it will still be accessible via browser console

As a Plus+ Member feature, this source code is hidden by the owner.