PloTTY Plots Images Generated by Midjourney on a Casio PB-700 Portable Computer
With an FA-10 pen plotter!
Plotters are computer-controlled ink pens that do a great job of creating vector or line art. One portable pen plotter was the FA-10 module for the Casio PB-700. And even though the computer is 40 years old, retro computer enthusiast Fred Stark wrote PloTTY to plot images generated by Midjourney with Casio PB-700.
PloTTY is not a single program. Instead, it is a set of Linux-based utilities that run on a modern computer to plot images on a 1980s-era Casio PB-700 portable computer with an FA-10 pen plotter module.
Communication between the two computers relies on the PB-700's cassette interface, despite PloTTY having "TTY" in its name! The PB-700 communicates at 300 baud, so sending data between the machines is a bit slow.
Stark's method for plotting line art images is straightforward. It converts the vectors into coordinates that the PB-700 interprets and then plots. The interesting twist is that Midjourney is the source of the pictures.
Midjourney is a bot that uses AI to generate four variants of an image you describe in plain text. To interface with the bot, you send it messages via Discord. Stark found that by adding the phrase "black and white line art constant thickness simple children coloring book" to an image request, Midjourney would return artwork suitable for conversion into line art for use with a pen plotter.
It might seem like the major challenge is converting the image into line art. But there are Python modules for that kind of task. The actual challenge was automating the requests! Midjourney does not have a public API. It only accepts Discord messages from non-bot accounts. So, Stark kludged various software utilities to automate entering the requests into a Discord client and then handle receiving the pictures. It could be better, but at least it is a functional solution (for now.)
Once Midjourney provides the image, another script converts it into line art and sends it to the PB-700 over the 300-baud cassette interface. Even though the FA-10 plotter module supported four pens, only one of Stark's is functioning. So, PloTTY only plots with a single color.
All the code needed to plot pictures on the PB-700 and FA-10 plotter is available in the PloTTY GitHub repository. Previously generated sample images are also available if you want to skip the Midjourney steps. Check out the blog post on Stark's website for details on how the scripts work.
Electronics enthusiast, Bald Engineer, AddOhms on YouTube and KN6FGY.