Thread Previous • Date Previous • Date Next • Thread Next |
Hi Fernando,thanks for your code. After a quick look, I have some questions; feel free to let me know that I didn't read the code right.
1. For poly-poly intersection, you check all edges in poly1 against all edges in poly2 (Interacton.cpp:95). That scales badly (i.e. O(n^2)) and will be unusable for more complicated polyhedra; I think that GTS or similar libraries have somehow optimized this (using spatial search trees, I think, but I am not familiar with that).
2. The repulsive force of both polyhedra depends on penetration of their bounding spheres, do I read it right? (dist=normOf(distance_Edge3d_Edge3d(...)); delta=R1+R2-dist; if(delta>0){ f=n*(Kn*delta) }). I am wondering how that could give correct results, especially for complex shapes like the jumping cow you sent.
3. Concerning integration into yade, how do we detect collisions? As we use aabb's, for irregular shapes the aabb will contain many other bodies that will not be in contact; but at every step, their contact will have to be checked for distance. Would it be possible to break (for instance) the polyhedron into many faces, compute collisions with single faces (like we do with Facets now) and then interaction the polyhedra as whole or something similar? (BTW we really should use grid-based collision detection, esys does that and they take no more than around 10% at the collision detection even for very large simulations).
To summarize, for anything except Polyhedron-polyhedron, one's probably better off using facets that we have already; if dynamic behavior is needed, clumped facets with some mass-bearing sphere in the middle will do. I thought you would have some sophisticated algorithms for poly-poly interactions, but it doesn't seem to be the case.
I did run the examples, but didn't see them as I don't have povray installed here, sorry.
Cheers, Vaclav
Thread Previous • Date Previous • Date Next • Thread Next |