Showing posts with label projects. Show all posts
Showing posts with label projects. Show all posts

Wednesday, March 25, 2015

The Small Triambic Icosahedron, or Why My Friends Suck

Math is cool. Geometry is even cooler, because it's math that you can see and touch and make off-color jokes about. Wait, scratch that last one. That's terrible. Why would I say that.

Back to geometry though. I had accidentally discovered how to knit a tetrahedron (sans base), and wanted to make something out of a bunch of them. The first thing that came to mind was a big spiky ball, or as Wikipedia calls it, a small triambic icosahedron. I dove right in. How about several colors, so that no tetrahedron is next to another one of the same color? How many colors would I need? More importantly, how many colors would I need to make it look good?


Well, how many?

Mathematically speaking, it takes a minimum of three colors:
1d20+4 to check for traps
The green triangle can't be red or blue.


But it's ugly. There are twenty tetrahedra; three doesn't divide evenly into it, so I'd have unequal numbers of each color.

Four colors, maybe? That divides evenly into twenty, right? Well yes, but it's still ugly:
Dang, I rolled a natural 1
There are too many blue triangles.
 
At a cluster of five tetrahedra, having only four colors means that one of them will occur twice, asymmetrically.

By that criterion, I'd need five colors to do it right. But is it possible to have no two adjacent tetrahedra, and ensure that every cluster-of-five has one of every color?


Well, is it?

Yes, it is! I came up with a five-color solution that not only fits the rules mentioned above, but has some additional nifty properties as well:
I don't think this thing will ever serve a useful purpose
  • No tetrahedron has two neighbors of the same color
  • The four tetrahedra of each color are spaced as far apart from each other as possible
  • The set of a tetrahedron, its three neighbors, and the tetrahedron exactly on the opposite side from it, contains all five colors
What's especially cool is that I wasn't trying to get those extra properties, they just happened. Mathemagically. I was super psyched to show my knitting friends all these emergent mathematical properties that I didn't even realize existed until after I'd finished the project!


Well then.

They think it looks like a ball of nipples. The first thing they said about it was, "It's a nipple ball!" Nothing I say or do can convince them otherwise. My desperate appeals to the mathematical beauty of symmetry groups and set theory fall on deaf ears. But the worst part?

The worst part is when I realize they're right.

It looks like nipples. It looks like fuzzy, colorful, triangular, shiny metallic nipples. It looks like there was an error on the assembly line that made robotic stripper outfits. What was once a triumph of the elegant beauty of pure mathematical form is now a boob joke. And nothing can ever change that.

Jerks.

Tuesday, March 24, 2015

QR Code Knitting: Becoming the printer I never realized I wanted to be

I love data formats. Always have. I was the kid who, at 12, reverse-engineered the conversation files in a computer game and turned an early-game character's dialog into my own choose-your-own-adventure game. I was the one who happily got a barcode scanner for Christmas, and figured out how to hide barcodes in hand-lettered calligraphy. Many an hour have I spent with a hex editor and the gif89a spec. Knitting a QR code was pretty much the next logical step.

Or was it?

You see, my cell phone was made in 1764. Instead of text messages, it sends telegrams in morse code. Its camera has a seeing-eye dog that is also blind. A full battery lasts 6 minutes, 29 seconds. No way is it gonna know what to do with a QR code. It would be completely useless to me. (Have fun figuring out whether I'm referring to the QR code or the phone.) But I didn't care - my mind was made up. I had to do it.


Gauge and Resolution

You know how a swatch 20 stitches wide by 20 rows long isn't square? That's a problem. You know how a knit stitch doesn't have crisp, straight edges? I'm starting to worry... You know how with fair-isle colorwork, patterns actually look like something, so you can easily tell if you've messed up? Gulp.

The first problem I tackled was gauge, testing this yarn on different needle sizes. As I went to progressively smaller and smaller needles, my gauge got closer and closer to square. It's a DK weight, so by the time I got to size 1s, I decided I could block out any remaining rectangularity. (Spoiler alert: it worked!)

Next, I decided to make each pixel in four stitches, a 2x2 square. This has quite a few advantages. Firstly, it gives them well-defined edges. The pixels actually look like little squares, instead of some amorphous blob. Secondly, it makes the purl rows mindlessly easy. I knit across following the chart, but on the way back, I literally just copy. If a stitch is white, I purl in white. If it's black, I purl in black. Ah, sweet, sweet laziness. Thirdly, it makes every continuous run of a color an even number of stitches long. Does that even matter? Yes, yes it does, and here's why:


Float Wrangling

I.
Hate.
Floats.

If they're too long, they become ugly, floppy little gauge-wreckers. If they're too short, the fabric has puckers and lumps and just generally looks like the surface of a giant fuzzy raisin. Even when they're exactly the right length, they take every chance they get to snag on things. Floats can go crawl in a hole and die.

"But," you ask, "What does this have to do with even numbers of stitches?"

As it turns out, everything. You see, knowing that floats are Evil Death Squiggles, I keep them under lock and key, far away from proper, well-mannered folk. With each stitch, I bring the working color around to the other side of the floating color. This traps the float against the forming fabric, both ensuring correct length and preventing it from rampaging through the countryside. However, it also changes the order I'm holding the yarns in. Having an even number of stitches means that after every pixel, the yarns are back in the same order they started!


Actually Knitting the Damn Thing

This was a really enjoyable knit, though not in the usual way. Sure, it was a small project, and who doesn't love instant gratification, but that's not it. Okay, so it was in a yarn I really like, but I barely noticed that aspect. Maybe the geeky theme was its big appeal? Wrong again.

What I really liked (and this is going to sound insane) was that knitting it made me feel like a printer. As in, the machine you hook up to your computer when you want to curse at a tiny screen that says "toner low". When I was knitting this, I was following a chart, a chart that had no meaning to me, a chart that made no sense but that I knew was right. It was immersive. I got into a rhythm, lost track of time, and before I knew it, I was binding off. And it felt perfect... almost.


The True Meaning of Fear

Would it work? The question made me cringe. I tried not to think about it, partly because I couldn't test it myself, and partly because everything had been going so well throughout the entire project. Every problem I had encountered, I solved with the sort of mathematical elegance I always strive for. The pieces of the puzzle had fallen into place like clockwork that fit like a glove. To have it fail to scan would be almost as tragic as that sentence.

I brought it with me to work the next day, knowing that one of my colleagues had a phone that could scan it. Without realizing how absurd it sounded, I asked him if he would please test the QR code I'd knitted.

"You knitted... a QR code? ...That's all kinds of awesome."

So are you, Really Chill Coworker. So are you.

And yes, it successfully scanned!

The top and bottom edges try really hard to curl in. I pinned them down to take this picture, then photoshopped out the pins.
I'm not sure how the little bit of black got onto the border. (Left edge, near the bottom)