collision detection and penetration depth

T

Thorsten Reichelt

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
 
D

Diez B. Roggisch

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.)


I've been working on a freeesolid binding for pyhthon - it has been pretty
much complete, and to create it was a piece of cake - I did it in two days,
while learning how to actually do it. At least under linux, with a decent
compiler available and the distutils at your hands, its no big deal.

I'd be glad to give the binding to you - but unfortunately, a hd-crash has
blown it into oblivion.

And in the meantime, I discovered that there exists some other lib that
actually was better suited for my problems: The Open Dynamics Engine. It
also featurs a collision detection amongst other features, and there exist
even two bindings for python: PyODE is one of them, the other I didn't try.

Maybe that helps you,
 
T

Thorsten Reichelt

I've been working on a freeesolid binding for pyhthon - it has been pretty
much complete, and to create it was a piece of cake - I did it in two days,
while learning how to actually do it.
I'm learning loads of stuff on the way during this project, so I'd be
glad for anything I can just use without really understanding ;).
At least under linux, with a decent
compiler available and the distutils at your hands, its no big deal.
Well, we're stuck with windows, really.
I'd be glad to give the binding to you - but unfortunately, a hd-crash has
blown it into oblivion.
Just my luck ;). Sorry about your lost work, I hope this was the worst
that happened.
And in the meantime, I discovered that there exists some other lib that
actually was better suited for my problems: The Open Dynamics Engine. It
also featurs a collision detection amongst other features, and there exist
even two bindings for python: PyODE is one of them, the other I didn't try.
Seems they've merged the two. Anyway, from what I've read so far, this
looks really promising. Thanks for the quick and helpful reply!

Regards,
Thorsten Reichelt
 
T

Thorsten Reichelt

[...]
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.)

And, another additional thought: What about blender? I'm not really
sure what blender can and cannot be used for. Would it be possible to
use blender functions for in an external (our) app? Blender certainly
has collision detection, doesn't it?

Regards,

Thorsten Reichelt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top