Press escape to exit fullscreen

{{sketch.instructions}}

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

{{$t('general.by')}}
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('general.eg',["mouse, keyboard"])}}
{{$t('general.eg',["visualization, fractal, mouse"])}}
{{$t('general.learnMoreAbout')}} Creative Commons
{{$t('general.joinPlus')}}
{{$t('sketch.sourceNotVisible')}}
{{$t('sketch.privateURLDescription')}}
{{$t('sketch.privateURL-pleaseSave')}}
  • {{v.title}}

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

  • {{co.title}}