Any arbitrary function can be expressed in terms of a bunch of cosine and sine functions of different frequencies (and amplitudes). A sine or cosine function is periodic. What else is periodic that we know of? A circle! When we move along a circle, we eventually end up at the same point - hence periodic.
The busy circular machines you see in the diagram, drawing the portrait of Maa Durga, are basically representing different sine and cosine functions. The size of a circle is their amplitude, and how fast they rotate, determines their frequency. Their 'handles' that are spinning - their lengths add up and yields the curve individually in horizontal and vertical directions.
In principle, if a continuous curve of any shape is available - you can draw it using this method.