At the beginning of the coronavirus lockdown, I was making a lot of art, and I challenged myself to incorporate engineering concepts into art somehow. I was inspired by an artistic robot arm that I saw on Olin College’s website and a drawing robot for Arduino that I saw on Instructables.
I wrote a Python program using scikit-image to to trace simple line drawings and convert them into a sequence of turtle-like commands that could be followed to recreate the drawings. I then constructed and calibrated a programmable cart that is capable of holding a pen. This cart was made by hand from easily-available electronic components, discarded materials (cardboard, wood, plastic bottle lids, etc.) and spare hardware that I had at home. Using code from the Instructable mentioned earlier, I was able to make my cart move by uploading the turtle commands generated by my Python program to the Arduino.
Line drawing made in Paint and saved as a PNG file.
Python program generates a sequence of turtle commands from the image.
Commands are uploaded to the Arduino on the cart.
The cart draws; the result is pretty close!
My Python program can decently trace line drawings and generate a sequence of turtle-like commands for recreating them. The cart successfully moves according to the directions generated by the program and comes within a few mm of the intended path in real life.