Offset in computeCenterOfMass

Issue #2 closed
Li Xiaosheng created an issue

I guess the center of mass is computed by CenterOfMass = sum(tetrahedron COM times tetrahedron volume) / overall volume

In such case, the code should be cmd += (p1+p2+p3) * (cvol/4.0) instead of cmd += (p1+p2+p3) * (cvol/3.0)

The current implementation thus causes some offsets when this function is called in volume-preserving mesh smoothing.

Comments (2)

  1. thunil

    Hi Li Xiaosheng, thanks for pointing this out, and sorry for the slow reply! I'll fix that right away...

  2. Log in to comment