Tuesday, August 12, 2008

Status report: week 11-12

As I wrote before, I added complete support for polyhedra and fixed collision handler.

Also, I made a little optimization to collision detector: bounding spheres. The idea is that testing spheres for collision is faster than testing polyhedra. Also, if we consider sphere with center in body's center of mass, it's rotationally invariant.

Then I spent some time trying to compile head GHC and DPH. My (not so pleasant) experience is described here.

When I succeeded, I wrote simple benchmark to evaluate gains from using bounding volumes. Result was disappointing -- simple 2-step simulation with 10 bodies took 9 seconds and almost 1Gb of memory to complete. After consulting with my mentors we concluded that vectoriser is not ready yet (delay is due to issues with GHC build system) and that I should postpone benchmarks for a while.

So, my plans for nearest future is to implement static bodies and BSP trees (I already started the latter). Until 21 of August I will be teaching at summer math. school, and then I will continue the work.

Also, I'll be writing SoC report for the Monad Reader soon. If you'd like some particular issue to be explained or highlighted there, feel free to tell me!

1 comment:

chak said...

Just to clarify. The bad benchmark results are not because the vectoriser generates such bad code. They are because, you didn't use (and can't use) the vectoriser at the moment.