Press escape to exit fullscreen


Archived Sketch

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

View Source Code

Click capture
to take a screenshot

Collision detection using space partitioning

If we have a single domain with 'n' moving objects, then collision detection means we have to test every object againset every other object. This takes n(n-1)/2 tests so 100 objects would require 4950 tests. This program demonstrates the use of dynamic space partitioning (quadtree) to reduce the number of collision tests when there are a large number of moving objects. The separate control window allows you to see the current parameters and statistics. It also allows you to setup your own scenario to experiment with. Requires G4P library for GUI components.
{{$t('',["mouse, keyboard"])}}
{{$t('',["visualization, fractal, mouse"])}}
{{$t('general.learnMoreAbout')}} Creative Commons
  • {{v.title}}

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

  • {{co.title}}