The algorithm in the script takes a source bitmap image and recreates it by playing a game of Tetris. Effectively, then, this is a Tetris printer.
Confused? Check out the video below to see the script in action, using various coloured pieces to recreate famous Nintendo game characters. After that, hit up the source link for a very, very detailed description of the maths, as well as an opportunity to try out the script.