If anybody is interested, it turns out that I'm implementing snow grains as deformable polyhedrons that can collide with each other.
This code can be extracted later for general polyhedron (made of triangles) collisions. Currently I have committed a code which can determine if any given 3D point is inside a polyhedron made of triangular faces. 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. 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.... And is much slower than spheres, so you can forget about simulations with 5000 polyhedrons, anyway. -- Janek Kozicki | _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

