Cool. Is there software that can create a Fourier series that matches the contour exactly, e.g. the contour of the mountain tops in the third pic?
Yer not from around these parts, are ya? ;)
Once you have the contour, just use FFTW (fftw.org).
http://en.wikipedia.org/wiki/Discrete_Laplace_operator http://en.wikipedia.org/wiki/Canny_edge_detector
You need a segmentation algorithm to draw a line where the mountains stop and the sky starts, that way y is really a function of x.