← Back to team overview

yade-users team mailing list archive

Re: re:"off contact" interaction 2


Luc Scholtes said:     (by the date of Thu, 02 Mar 2006 11:53:16 +0100)

> Unfortunately, what do you think about this way of doing? There is 
> probably a problem concerning the calculation time because the 
> contactGeometry (normal, Radius) is calculated every time the 
> boundingBoxes are interpenetrated, even if the interaction is not 
> active, no?

if your solution works, then it's OK. Since currently there is no clean
solution, any solution you can think of, is correct.

It's also remarkable that your solution is similar to what has been done
some time ago, when moment rotation law was at first introduced. It's a
very important hint for me, about how the clean design should look like.

about speed: when bounding volume ovelaps, there always MUST be a radius
check, to see if the spheres indeed interact. By increasing bounding
volume you of course increase the number of checks. But this is totally
inevitable - you have a long-range interaction, so you MUST perform
long-range checks.

However you can make it a bit quicker. square-root function takes a bit
more time than simple multiplication. so instead of Vector3f.length()
you could use squaredLength(), and compare it against squared radius.
This will be a bit faster.

if squaredLength is not the sulution - because you really need the
length, which not squared. then there is nothing you can do.

Janek Kozicki                                                         |
Yade-users mailing list