I’ve been working on plotter capabilities lately, and I’m ready to reveal my secret project:
While the finished product is in no way “better” than other rendering techniques, I find this approach really amusing because the entire purpose of ASCII art is to render graphics when only characters are available. On a plotter, of course graphics are native and characters require an extra step, so this is dumb… for fun.
For this I created a toolpath font by generating raster characters of the fixed-pitch “OCR-B” font, then performed centerline tracing using Autotrace (as a plugin for Inkscape). These would serve as my pen paths. The auto-generated paths are not that great so I heavily edited the paths manually to my liking.
I then wrote a program that parsed out the Bezier paths from the SVG file and split it into a few Bezier paths for each character. I can then generate g-code for any character at any size at any location by scaling and offsetting the coordinates and emitting G5 commands for Bezier curves. Marlin’s Bezier support is turned off by default so I had to turn on G5 in the firmware. Marlin’s implementation for G5 worked on the first try.
Now that I can generate arbitrary text, I had to select an image and render as characters. This is simply creating ASCII art. I ended up doing this conversion myself because I wanted an accurate brightness model for the particular font I was using, and because it’s not that hard.
The drawing itself it took about 4:40, and my phone died partway through filming.
All in all, it’s been a lot of work to render an image as text as pen strokes. But that was the point from the beginning.