← Back to team overview

yade-dev team mailing list archive

Re: polyhedron collisions

 

Great to hear that. I hope you will also commit a very simple example,
like 2 of those bumping into each other.
> The snow grains are not "clean" polyhedrons and not convex. Sometimes
> they have stupid faces nearly facing each other. I made the code to be
> slower but correct, it was easier than cleaning all stupid faces (and
> it still would remain concave). So it will work very good with
> convex polyhedrons, and it will work acceptably with concave
> polyhedrons.
>   
AFAIK the common solution is to cut the shape into parts that are
convex, since convex shapes are mathematically easier to handle.
> When detecting collision I am going to iterate over all points from
> one polyhedron checking if it is inside another polyhedron and
> vice-versa. I'll have a list of polyhedron points that are inside of
> each other. I'm going to assume that there is a plane of contact
> which is somewhere in the middle of all those points. From that get a
> penetration depth and normal of the contact, then it can go straight
> to our CohseiveFrictionalContactLaw....
>   
There are sophisticated algorithms for detecting triangular surface
collisions (see httpo://gts.sf.net for some references). For such
complicated shapes, though, what folks in Glasgow do (and what I tried
with tetraheda) is to treat the intersection as volume, i.e. compute
volume and direction in which this volume is the thinnest (that is the
direction of repulsive force); I used exact code for that (which is -
who knows - maybe incorrect: extra/tetra), Bicanic &co in Glasgow get
the direction from some averages over normals of planar elements
involved in the collision.
> And is much slower than spheres, so you can forget about simulations
> with 5000 polyhedrons, anyway.
>   
I bet you can forget simulations with 500 polyhedra as well ;-) Do you
have some benchmarks on that, BTW?




Follow ups

References