Major work · February 2025
Plot & Scribble
A pen-plotter toolchain that turns my sketches into G-code without losing the wobble.
Why it matters
Vector-to-plotter pipelines "clean up" your linework until it looks like clip art. The whole point of drawing by hand is the imperfection, and every default in the chain is quietly trying to sand it off.
What I built
A Node CLI that ingests SVG, preserves hand-drawn path jitter, optimizes pen-up travel with a greedy + 2-opt path sort, and emits machine-specific G-code with configurable pen-pressure curves. It includes a preview renderer that shows estimated draw time and travel waste before you commit a 40-minute plot.
What I learned
Travel optimization is a real TSP-flavored problem, and "good enough" beats "optimal" when the plotter is the bottleneck. Preserving imperfection is a design decision you have to defend in code — it's trivially easy to smooth it away in a normalization step you didn't think twice about.
A pen plotter is a small robot arm that holds an actual pen and drags it across actual paper. It is the most honest output device I own: there’s no anti-aliasing to hide behind, no undo, and a bad path order means watching the pen skate uselessly across the page for minutes at a time.
Plot & Scribble is the toolchain I built so I’d stop dreading the export step. It takes my SVGs and does three things the off-the-shelf tools wouldn’t: it keeps the hand-drawn jitter instead of “optimizing” it into vector perfection, it reorders the draw path so the pen wastes as little travel as possible, and it shows me — before I commit — exactly how long the plot will take and how much of that is wasted movement.
The travel optimizer is a greedy nearest-neighbor pass followed by 2-opt cleanup. It’s not optimal and doesn’t need to be; the plotter is so much slower than the solver that “good enough, instantly” wins every time. The preview renderer paid for itself the first time it talked me out of a forty-minute plot that was thirty minutes of the pen flying around in the air.