matthias-research / pages

My web page containing all the demos from my youtube channel "Ten Minute Physics" www.youtube.com/c/TenMinutePhysics
656 stars 137 forks source link

Softbody Demo Deviatoric Energy Discrepancy #27

Open larryoatmeal opened 1 year ago

larryoatmeal commented 1 year ago

Hello! Having been taking a look at the demo "A Constraint-based Formulation of Stable Neo-Hookean Materials". In the paper the deviatoric constraint function is defined as C_D(F) = sqrt(tr(F^t * F)). However in the demo implementation it's defined as

C = vecLengthSquared(this.F,0) + vecLengthSquared(this.F,1) + vecLengthSquared(this.F,2) - 3.0;

It makes sense to me that the constraint function is defined like as such (zero when there is no deformation) but is there a reason for the discrepancy with the paper? (The hydrostatic constraint seems to match up with the paper). Any insights would be greatly appreciated and thanks again for making all of this public!