Just watch! Notice how the line never crosses itself. The knobs move with the drawing. (Use Turbo Mode to skip to the end.) If you like this, I've created a version with multiple drawings here: https://scratch.mit.edu/projects/103335103 To produce the image, I converted a source image file into x and y coordinates, then calculated the optimal path through the points, by solving this as an instance of the Traveling Salesman Problem.
I used this web app to determine the coordinates for the source image file: http://arohatgi.info/WebPlotDigitizer/app/? This site planned the route as an instance of the TSP: http://neos.mcs.anl.gov/neos/solvers/co:concorde/TSP.html