Bruno Chareyre said: (by the date of Wed, 23 Jan 2019 11:03:27 +0100) > On 1/22/19 2:38 PM, Chia Weng Boon wrote: > > > > Can someone lead me to the file for polyhedra display in YADE? Maybe I > > can try to get the display to work in qt. I can't recall how I made > > it work for Potential Particles in qt. At one point in time, I always > > playing with marching cubes..but it used too much memory and the > > rendering was not very nice. > > > > Hi, > I don't know the marching cube method but if potential blocks are > Minkowski sums of polyhedra and spheres - as I think they are, then it > should be enough to combine existing functors since that's exactly how > PFacet polyhedra are displayed. And it should be efficient. > Let me know. > See the figures in [1], they are from yade GUI for most of them. > Bruno
Actually PotentialParticles are not Minkowski sums. This would be the case if a sphere was not added to the particle shape. Previous sentence might sound weird, but that's actually how it works. Chia defines a formula for the shape of the particle (declaring each side of a polyhedral). The isosurface at which this formula==0 is the surface of this particle. Up to this point it would be directly a Minkowski sum. But afterwards he adds x^2+y^2+z^2-R^2 to this formula. This means that he is adding a sphere to this formula, and all the shapes suddenly look like cushions with soft corners instead of polyhedral Minkowki sums. Chia, I have discovered that setting Gl1_PotentialParticle().store=True fixes all the display problems which I had with examples/PotentialParticles/cubePBscaled.py Why did you set it to false by default in C++ code? When it was false the marching cubes algorithm was executed for every display refresh, and when drawing just one particle it was recalculating marching cubes for all perticles. No wonder it was slow. Like n^2 slow. So after setting store=True, the display now works nicely. But still the collisions do not work. I hope that you can fix that. I made a short video to demonstrate what I'm talking about: https://www.youtube.com/watch?v=1XEtGrbo7lM Regarding other two examples: PotentialBlocks/WedgeYADE.py PotentialBlocks/cubePBscaled.py I could not get them to work no matter what. The particles just sit there and never move. I will write next mail about that, because I have done some analysis of your C++ code and it might be useful to someone who plans to continue working on PotentailParticles, maybe Vasileios? best regards 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

