http://www.babylonjs-playground.com/#FJNR5#34
If you can do this with 5 lines of code, you've probably already read all the long but didactic documentation about the brand new Dynamic Terrain Extension what I'm currently and shamelessly promoting in this inadequate sub forum with this link
Have fun