# How to simulate elastic material with restoring shape

I'd like to simulate a rubber-like material. This material if deformed would experience a restoring force to its original shape, a bit like a school rubber ereaser.

I tried with a spring-mass system but the system become quickly instable, moreover it's computational expansive.

Doing some research I found out I could simulate this behaviour through finite element method If I understood well. The problem is I haven't got the right mathematical tools to understand this method.

So how would you face up to this problem? Resources, links, tutorials, papers are welcome.

• You're probably on the wrong SE side for this, as your problem is more a physical and a mathamtical one. Try math.stackexchange.com or physics.stackexchange.com or search for a fitting one here stackexchange.com/sites# Furthermore, try to ask specific questions about things you don't understand. Recommendation questions usually are closed as well.
– Tare
Oct 5, 2018 at 6:13
• This is not my field, but there are quite a number of SIGGRAPH/Eurographics papers covering animation of elastic materials. Siggraph also runs courses - a quick search turned up this collection which might help: physicsbasedanimation.com/resources-courses Oct 5, 2018 at 7:56
• Do you want to simulate it in real time? If so, shape matching (Meshless Deformations Based on Shape Matching by Matthias Müller) may be useful. If you can afford offline simulation, you would get better quality but it costs extra (backward Euler+accurate constitutive model). Oct 5, 2018 at 16:59
• For stability consider a different integration scheme (perhaps an implicit one), take smaller timesteps or an adaptive timestep, avoid using thin triangles (if you're using triangles), impose various dampers or caps to things like acceleration. All that stuff is just going to make performance worse. For performance consider parallelizing it and making it "adaptive." Other methods like FEM, MPM, SPH, FLIP, PIC are all just other ways to implement PDEs. All of them are likely to be slower than a spring mass system. Oct 8, 2018 at 8:57

## 1 Answer

A good introduction to finite element methods for deformable body animation is Sifakis and Barbič's course FEM Simulation of 3D Deformable Solids from SIGGRAPH 2012.

However, since you say

I tried with a spring-mass system but the system become quickly instable, moreover it's computational expansive.

you should know that a finite element model is usually more expensive than a mass-spring system. If you're having problems with instability, you should try keeping your mass-spring system but (i) reducing the time step, or (ii) doing implicit integration; see the "Implicit Methods" chapter of the Witkin and Baraff notes.

You can also consider position-based dynamics or projective dynamics, which are fast, stable, and easier to implement than FEM. They may be good enough for your needs, unless you require high accuracy or nonlinear material models.