yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00894
Re: polyhedron collisions
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Václav S(milauer <eudoxos@xxxxxxxx>
-
Date:
Sun, 25 Jan 2009 08:40:40 +0100
-
In-reply-to:
<20090125055558.7ced1489@szpak>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.19) Gecko/20090105 Lightning/0.8 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666
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