collision detection and penetration depth

Thorsten Reichelt thorsten.reichelt at urz.uni-heidelberg.de
Mon Oct 25 07:52:19 EDT 2004


Hi,

I'm involved in a research project on spatial prepositions. In that
project we use very simple, static 3D maps that are represented in a
tiny subset of x3d enriched with some few linguistic information.
Until now, we home-brewed all 3D-related calculations for two reasons:
First, we thought we'd get away with pretty basic and simple stuff
throughout the project. Second, we didn't detect even one Python
module that would support x3d data input. 

But now we do need an exact collision detection and penetration depth
calculation algorithm that performs on a given pair of polyhedra.
Performance is not important, it obviously needn't perform on a
dynamically changing scene and if the algorithm doesn't interface with
x3d natively, no problem either. 

So far, I've been looking into the enhanced GJK and the FreeSOLID
algorithms. But I must admit that the math behind them both is beyond
me as is, unfortunately, the amount of c/c++ involved. My knowledge in
c is rusty at best, and, being a windows user, my knowledge in
building anything from c sources isn't much better. I had no luck in
compiling them using MSVC++ or mingw (cygwin works, but makes it
dependant on the cygwin1.dll).

So, my questions are: Is there an existing Python module that offers
exactly what we need? If not, what should be my course of action: 
1. Try to get a working .exe out of the FreeSOLID package (it has some
sample apps) and passing args on command line?
2. Try to reproduce the needed code in Python (without really
understanding what I'm doing *ouch*)?
3. Try to make the FreeSOLID functions usable in my Python scripts?
(This would be embedding/extending, right? Haven't done that before,
either. And it seems there's a lot of c involved again.)

Okay, hope I didn't give too much unnecessary information,

Thorsten Reichelt



More information about the Python-list mailing list