Corotational FEM cloth
Triangle membrane elements with corotational linear elastic energy[1]. Implicit Euler with CG, same outer loop as the BW98-like mass-spring sibling.
50×50 grid pinned at the two top corners, 4802 triangles. Material constants: (shear modulus), (first Lamé), thickness . Edit the scene above; changes auto-apply.
Per triangle, build the deformation gradient from the rest pose, extract rotation via SVD ( with reflection fix), and evaluate
The Hessian here is the Gauss-Newton approximation (drops terms). SPD by construction, so CG converges; recovering those dropped terms via operator splitting (cf. Kugelstadt 2018[2]) gives faster convergence on stiff materials.
Color encodes per-triangle area strain (green = rest, red = stretched, blue = compressed). Click and drag any vertex.
What you trade for going FEM over mass-spring: shear behaviour falls out of instead of needing diagonal springs, and resolution refinement no longer changes the effective stiffness.