Michael Birken lays out, in detail, a method for teaching a computer to draw arbitrary 8-bit images by playing Tetris, strategically deploying blocks of various colors to cause exactly the picture you want to emerge. The method is (as you'd imagine), starkly terrifying in its complexity, but the video speaks for itself.
The algorithm converts pixels from a source image into squares in the Tetris playfield, one row at a time from the bottom up. To generate an individual square, the algorithm assembles a structure consisting of a rectangular region fully supported by a single square protruding from the bottom. When the rectangular region is completed, its rows are cleared, leaving behind the protruding square. Three examples of the process appear below.
The algorithm can also generate multiple squares with a single structure as shown below.
During construction of a row, all of the squares produced by this method must be supported. In the images above, the generated squares are supported by the floor of the playfield. However, if an arbitrary row contains holes, it may not provide the support necessary for the construction of the row above it. The algorithm solves this problem by constructing a flat platform on top of the row with holes. In the animation below, a platform is built above a row comprising of a single red square. The platform is a temporary structure and inserting the final piece removes it.
Tetris Printer Algorithm
(via Hacker News)
Saturday night was the tenth annual Mid-Century Supper Club’s holiday potluck and, as is customary, photos from it have been flooding my feeds since it ended. Once again, there were lots of great creations (and costumes, whoa boy) but I was particularly gobsmacked by this gingerbread (and candy clay) house fashioned after the circa 1974 […]
The first time I encountered Matteo Pizzolo, Amancay Nahuelpan and Tyler Boss's comic Calexit, I was skeptical: California separating from the USA is an incredibly stupid idea, predicated on innumerable misconceptions (including the idea that the state that gave us Nixon, Reagan, and Schwarzenegger is uniformly progressive, and also the idea that "the world's sixth […]
When I was in Berlin last month, I stopped into the offices of Netzpolitik (previously), the outstanding German digital rights activist group, where I recorded an interview for their podcast (MP3), talking about science fiction, utopianism, dystopianism, how we can change the world, and why my kid has so many names.
For the true audio enthusiast, there’s a lot of difference between putting on some songs “for background music” and a true listening experience. For the latter, there’s nothing like a pair of sturdy headphones and the powerful speakers that come with them. And the wireless variety doesn’t get much more powerful than the TREBLAB Z2 […]
Digital or analog, there’s a path of least resistance for any project. Finding that path is what the Agile methodology is all about, which is why proficiency in it is a must for any project management position – and the paycheck that comes with it. And the quickest path to learning Agile? The Agile Project […]
Everybody’s flown a paper airplane. But what if you could fly on a paper airplane? Until we invent shrink-ray technology, the PowerUp X FPV Video Paper Airplane Kit will have to do – but it’s as fun as that sounds and more. The original version of this creative toy added drone tech to the old, […]