Yes i do:Dirk Gregorius wrote:So you do this the following?
c = ( p1 + p2 + p3 + p4 ) / 4
p1 += k * (p1 - c) / |p1 - c|
...
This would be an interesting approach. I am not sure if this is physical correct though. The displacements should be in the direction of the gradients to be kind of "workless"". I need to think about this. The gradients I posted above are the derivatives of C w.r.t p_i where i = 1..4.
Or do you just do this:
c = ( p1 + p2 + p3 + p4 ) / 4
p1 -= c;
...
p1 *= k;
...
p1 += c;
...
p1=(p1 - c) k + c
etc..
'c' can actually be anywhere inside the tetrahedron, weighed by vertices's mass, even if it doesn't make much sens for a tetrahedral mesh , where tetrahedrons are expected to be the mass carriers, but its to be consistent with other simplex and leave room for tweaking.
As for physical meaning, i am sure that you are right, but I'd like to see both solutions in action , so tomorrow, I'll try to write a small test app to visually check the triangle case.
Nat.