30 minutes on the printer got me from this https://www.printables.com/model/430583-prusa-mini-pen-holder to a part I could bodge with a drill so it actually fit a pen.
Now we need some software. Just for fun I didn't write any of it, I got aider
to do everything. Ended up with a little python app I could run like this:
$ .venv/bin/python line_drawing.py 41067996924_e538c9bf69_o.jpg --min-area 0.08
That gives a debugging plot like this, which handily shows the process:
Here's a better look at the final output - here as an image, but the tool also makes an svg.
Followed this tutorial to get inkscape to make gcode from svg: https://urish.medium.com/how-to-turn-your-3d-printer-into-a-plotter-in-one-hour-d6fe14559f1a
And here it is on the printer: