ASCII Art in Grasshopper
ASCII art is a graphic design technique that uses characters from the ASCII (American Standard Code for Information Interchange) set to create images, symbols, and designs. This form of art involves arranging text characters to form a visual representation of objects, scenes, or abstract patterns. I first encountered this art form in the 90s through readme text files and computer games. Years later, attempting to automate it in Grasshopper was a lot of fun. My initial goal was to calculate the density of Arial letters, the standard font used in Grasshopper. However, this task proved more complex than I expected. So, I found a prearranged set of letters online, organized from darkest to lightest. I could use this set to replace pixel darkness with corresponding letters via a simple Image Sampler operation.
This Grasshopper definition generates ASCII art. The inputs are the image file, grid size, and density. If you decrease the density, the image becomes unrecognizable; if you increase it, the calculation takes a lot of time. The output is a set of text objects in Grasshopper, making it ready for printing, laser cutting, and other processes once baked into Rhino. Additionally, this model can be used to explore and learn about domains and text operations in Grasshopper. There’s room to experiment with different letter sets. Additionally, instead of a square grid, letter locations could be calculated as in typewriter art.
You can rebuild the definition by looking at the diagram above. It is pretty straightforward. The model uses native Grasshopper components without any add-ons. However, if you want to support my website by downloading my working Grasshopper file, would you like to be one of my Patreons? The link to my Patreon page includes the definition file for the ASCII Art in Grasshopper and more.