This gif demonstrates how combinations of Fourier series mathematical functions can be used to create complex animated surfaces like these: Fourier Series, & Rectify. Fourier series functions create certain periodic waves such as square, triangle, sawtooth, or semicircle waves from the sum of simple sine waves. In this example a Processing program uses combinations of sine waves and Fourier series functions to simulate a complex undulating surface.

Simple sine waves applied to the vertical and horizontal axes were used to generate a static base form:

The forms are
projected in perspective with the amplitude of a sine wave modulating
the z axis depth in space. When the two are added together they make:

Fourier series triangle wave functions applied to the horizontal and vertical axes, and added together make:

Using a different frequency there are four times as many triangle waves as there were sine waves. Combining all four functions, two sine and two triangle Fourier series waves, makes:
Animating the composite form by moving the triangle waves across the static sine waves makes the final gif, top.
For simplification, two of the four functions that are combined in this example are just sine waves. The other two Fourier series functions are only a few sine functions, sufficient to create a suitable triangle wave.
This example, as well as each surface in Fourier Series, & Rectify could be used to model physical surfaces.

The & Rectify gifs are based on waveforms similar to Fourier series mathematical functions. Programs written in Processing
generate and animate surfaces using combinations of sine and cosine waves. Wave frequencies determine the
number of forms within the frame. Wave amplitudes are applied to the z axis
placing each pixel forward or back in space. The phase changes with each frame,
moving some forms across the plane. The functions used are similar to a Fourier series in which sine and cosine functions are combined to approximate square, sawtooth, or triangle waves. In each of these examples the functions were modified to create new, irregular periodic forms. Multiple functions are applied to each frame. Some forms remain static while others move. Ultimately, functions are combined at the pixel level. In each case two gifs were created, with one using a rectified version of the static forms. These rectified versions are identical to their corresponding gifs except that pixels in negative z space are flipped to positive values.
The Fourier Series are gifs based on waveforms similar to Fourier series mathematical functions. Programs written in Processing
generate and animate surfaces using combinations of sine and cosine waves. A wave frequency determines the
number of forms within the frame. The wave amplitude is applied to the z axis
placing each pixel forward or back in space. The phase changes with each frame,
moving forms across the plane. The functions used are similar to a Fourier series in which sine and cosine functions are combined to approximate square, sawtooth, or triangle waves. In each of these examples the functions were modified to create new, irregular periodic forms.