In a previous post I showed off an example of marching squares, where the process of how the algorithm works had an animation that step through to help visualize how it works.
This one is more of an idea of how someone can use marching squares. The idea is still the same, you have a grid of points and you traverse through it as 4 point cells. In this example, before I render any of the cells, I loop through by passing its X,Y value to a 2D Perlin noise function. With the resulting value I then use a glsl like "step" idea where for example if the noise is over 0.4, it equals 1 else 0, which I use as a way to set a point as ON or OFF.
So with a grid of points that are ON/OFF, let marching squares do its rendering thing and as the results you kind of get this 2D cave system. If you use the WASD keys on your keyboard, you can actually walk through the noise function.
Hopefully this is a nice example to help people get started with the idea of procedurally generated content.