As-Rigid-As-Possible and others related mesh deformation methods

I’m looking for a good way to deform a plane 2D mesh by moving only a subset of its vertices. I post here to share my investigations about this topic.

There is the ofxPuppet addon for openFrameworks (thank you @zach). This is great but I’m not so happy with the results.

So I made some tries with the CGAL library. CGAL provides 3 differents methods :

  • The As-Rigid-As-Possible (ARAP) method
  • The Spokes and Rims method
  • The Smoothed Rotation Enhanced As-Rigid-As-Possible method

My conclusion is that the CGAL Smoothed Rotation Enhanced As-Rigid-As-Possible method is far much better than the ofxPuppet method, which is perhaps kind of old. Of course it can depend on the use case.
In the image below, the Smoothed Rotation Enhanced ARAP method is at the bottom left corner, the ofxPuppet method at the bottom right.

I share this with you because it took me some time to make it work, and perhaps it can save yours :slight_smile:

Here’s the application which show the results given by ofxPuppet and the 3 CGAL methods :