I’ve done many of these using decay along edges. Basically, measure distance to nearest edge and if it’s less than a certain value, reduce the vertical movement of points the closer they are to the edge.
A quick search returns these though there are many more to be found:
These below use a different method than fading near edges though, as suggested here:
