Fast forward a couple months

For a friend’s birthday I thought it would be cool¹ to print her a birthday card using our new Axidraw. There is even an example included in their documentation:

While on one hand it was cool¹ that her card would be drawn by a robot on the other hand it just seemed kinda lame and impersonal. So I thought: “Hey, it would be really cool¹ if I created a custom design in Processing!” 🤔

So I fired up my code editor and got to work. I eventually landed on a simple (one might even say brutalist) design:

Kind of like digital needlepoint

After reviewing the design I thought it would also be nice to include a copy of the code I had written to produce the image…

And then it hit me:

It would be super badass² if the design actually included the source code into itself!

Video footage of me at that exact moment. “Woah”

WTF is a Quine?

It turns out this type of program actually has a name: Quine. A quine is type of program that when run produces output that when run produces output that when run produces output… JK.

The fine folks at wikipedia can describe it better than me:

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are “self-replicating programs”.

If you are unfamiliar with programming or recursion, trust me, its kinda trippy to think about. Add some processing, a pen plotter, and a happy birthday on top of that and, baby, you got a stew going.

The final output (and input 😂)

Before continuing I’d like to take a moment and make sure you understand the joke in the title above — I am very proud of it!

The final design used the code as the background and the message was set in negative space:

The final design

Now we are almost ready to print! Next step is to figure out ink and paper.

We could go with the classic black ink on white paper? Boring.

How about silver ink gel pen on black paper? Badass².

YOLO