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.
That is really cool. Well done. Building the machine, tuning and calibration. Then fixing the stuttering issue. Not to mention all the software side to get it to gcode that I don’t know how you did… anyway that was a lot of work for pupper. Well done indeed.
I was going to upload some g-code for you but it’s rather big. But you can try this:
Go here: https://vector76.github.io/gcode_tpgen/
For Mode, select the "Text" radiobutton (last one)
In the text box at the bottom of the form, copy-paste your text (don't worry if it wraps lines, it knows where the true line endings are)
Enter your page size for X extent and Y extent. For a 10" (in X) by 7.5" (in Y) drawing that fits comfortably on a US Letter size page, try X Extent of 254 and Y Extent of 191. It will stretch the text to fit these dimensions.
Most of the other defaults for feed rates should be reasonable.
Click generate, and it should let you download a gcode file.
To use the generated gcode file you must compile your firmware with G5 splines enabled!
If you have trouble I can try to answer specific questions.