Skip to content

eeetem/Collision-Detection-Algorithm-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collision Detection Algorithm Demo

A visual demostration of K/D tree spatial partitioning used for collision detection.

Collision detection with a large number of objects/particles very quickly get very expensive to compute since every object has to be checked against every other object. This is an implementation and a visual demonstartion of an algorithm that splits the space into subareas based on object's median positions, the result of this is that instead of every object requiring to bruteforce check every other object, they only end up checking only a couple nearby objects. That results in the time complexity going from O(n^2) to O(nlog(n)).

Physics tickrate, framerate and toggling of the partitioning algorithm(as oposed to bruteforce collision check) is available in order to observe the effects of the algorithm on performace.

image

About

Visual demostration of K/D trees spatial partitioning used for collision detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages