← Back to team overview

yade-users team mailing list archive

Re: Any idea to calculate the total nooverlapping volume of the particle assembly?

 

 > (1) For tetrahedral elements, I wonder it might be good to use the
 > polygon boolean operations (there are some example cases in CGAL, 3D
 > boolean operations, Nef_3), but for spheres I don't have any idea

You can check in trunk:extra/tetra/Tetra.cpp:226 etc, it is exact 4hedra
intersection code which returns the intersection as union of a number of
4hedra (0, 1, or more); I used it a bit and I am reasonably sure that it
is correct... But the algo is by its nature slow.


 > (2) I wonder if opengl has any embedded methods, since it supports
 > selection the object...

AFAIK core openGL just gives you ray corresponding to the click (i.e.
ray that is projected as the point you clicked on the screen) and you
have to find by yourself what objects it intersects. It is drawing lib,
not geometry lib.

 > (3) More complicated algorithms like ray tracing, etc, but those
 > algorithms are beyond my area of knowledge.
 > The reason I think of those methods, is the sampling method (grid
 > method) is still an approximate method, while polygon boolean
 > operation is an accurate method..., I might be too critical at this:)

Approximate alogs are tricky in that you have to code also some
sufficient precision criterion. Otherwise you will have to hardcode very
fine grid resolution to be reasonable for all corner cases.

Please keep me (us?) posted on what you find out about this. You could
make a page on wiki on that, too :-)

Vaclav

_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users



Follow ups

References