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)
About Blooks is a blog devoted to “blooks,” objects that look like books but aren’t, such as book-shaped handbags, hollow books used to hide valuables, and booze flasks that are disguised as books.
Crowbcat created a Portal setup that had Chell, the game’s heroine, trapped between two portals that crushed her. The results were an astounding wonderland of psychedelic visuals
Jindo Fox writes, “A few years ago, Cory linked to some wonderful pictures in Usborne’s 1983 classic Introduction to Machine Code for Beginners. Usborne has made PDF copies available of their whole line, with the only restriction that you link to their page, not to copy and redistribute the files themselves. Very cool. I have […]
You’ve heard the news: cyber security is the new and very scary frontier. Hackers are out there just waiting for you to relax for a second and let them in. But that’s not going to happen to you. With a lifetime premium subscription to ZenMate VPN, you’re completely protected from anyone out there who wants […]
Remember back to the time when people thought java was just a hip way to talk about coffee? Or you vaguely remembered from geography class that it’s an island in the South Pacific? We’ve come a long way since then and now that we’ve rocket blasted into the tech future, you’re going to need to […]
Plastic is so 2013. You don’t want to buy something only to throw it away or lose it and barely care. You like nice things and want to hang onto them. The Plazmatic lighter here is a high quality, high tech alternative to the typical cheap, plastic lighter you get at the old gas station. […]