Tristan Hartskeerl 2004-2008

Spatial Hashing

Category: News
Posted: 2007-11-06 12:24

I was curious to see how spatial hashing would improve the efficiency of collision detection on 2d spheres (to be more precise, disks), which resulted in me implementing it to see just how good this magical solution works. I was surprised with the results. For a simple test case (minor variation in sphere size, grid cell size and hash table size tweaked to specific situation) I can test for collisions between many more spheres than I would dare do the old (brute force) way.

I used the hash function from paper titled "Optimized Spatial Hashing for Collision Detection of Deformable Objects" from here. It seems to perform pretty well (I pick z=0, and stubbornly pick p1, p2, p3 to be 549977, 1002049 and 1171301 respectively).

http://king0r.dyndns.org/blog/upload/hash-coll-1s.png
The screenshot shows 600 spheres (actually less since the image is cropped) that are collision-checked.

An explanation for the stats in the upper left corner: the FPS line shows two values (left: 1/frametime, right: number of frames during previous second). The second line shows the number of checks performed this frame / the number of tests if all spheres were to be checked against all other spheres. The fourth line shows the result of the division from line 2, and the third line is the inverse of line 4.

Now to add this to the old crummy 2d shooter I once made... (which suffered from slow collision detection).
Permalink

Forum

Category: Server
Posted: 2007-10-07 00:58

I installed phpBB 2 at this URL. The forum's purpose is as of yet unknown but it's probably going to be used for random chatter, feedback and questions (the last two apply mostly to what's in my SVN repository).
Permalink

Summer vacation

Category: News
Posted: 2007-07-30 10:01

Well a year passed in the mean time, during which I only made one post =/.

Fortunately, this news thing ( sadly called a "blog" ) is not the only thing that can be updated - the SVN repositories get updated a lot more often (with a total of about 141 revisions in 2 repositories - Code Dump and Research - last year).
Permalink

Bachelors thesis done

Category: Research
Posted: 2007-06-26 10:05

I finished my BSc. thesis (actually, I did in January) and I got my Bachelor of Science degree. It took me long enough but I actually started my master course last year so I've hardly been delayed.

NOTE: I fudged the date of this post.
Permalink
« First « Previous
1 of 5
Powered by sBLOG XHTML 1.0 Strict PHP CSS
Local time: 2010-03-21 10:03 GMT+1
Powered by sBLOG © 2005 Servous