Shaping function to grid

Hi grasshoppers. I want to apply a shaping to my grid of points/lines. How do I do that? See the picture and then imagine it with a curve that preserves distance between the points and lengths of the lines. It can curve the lines into the third dimension. See grasshopper definition below if interested in the stuff.

grid_no_shape (32.6 KB)

Link to inspirational example [0:39]: