Cellauto.js – a library for creating cellular automata simulations in JavaScript
sanojian.github.io
sanojian.github.io
As the author of Terra, I'm surprised to see how similar the API for cellauto is... and by that I mean it's nearly identical :-P sanojian, were you aware of Terra while writing this?
Nice work!
You would have to add the weight of the material and track the pressure of each cell along.
Also, you could introduce a 'firmness' factor, so that the rock would break at some pressure level.