A printer that draws in one continuous line
My 3D printer died. Before I fixed it I taped a permanent marker to the extruder, told it to follow a path generated from photographs, and discovered an obsession with one-continuous-line drawings. The fix to the printer took weeks longer than it should have.
Demo. The printer drawing, in motion.
The pipeline
- Input: A reference photograph (usually a portrait).
- Edge map: A classical edge-detection pass plus a thresholded gradient.
- Path solver: A travelling-salesman-style heuristic finds an ordering that visits every "ink point" with the shortest total travel, and, crucially, without ever lifting the pen.
- G-code: Emit motion commands for the printer; Z stays flat, only X/Y move.
What I'd revisit
The path solver is a greedy heuristic; on portraits it sometimes gives away the first-stroke direction. A proper two-opt pass (or a tiny RL agent) would clean that up. I'd also love to try this with a real ink pen on a real plotter; the marker-on-printer rig made the lines too thick to compete with the algorithm.