Pixels rearrange themselves and morph into different works of art

The Creators Project points to a neat little project where famous works of art are re-arranged and transformed into other famous works of art. So the Mona Lisa can become American Gothic and vice versa. It's like seeing art become a wonderful illusion.

The project was done as a sort of programming puzzle at CodeGolf. The instructions:

You are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of pixels.

Your task is to create an algorithm that makes the most accurate looking copy of the Source by only using the pixels in the Palette. Each pixel in the Palette must be used exactly once in a unique position in this copy. The copy must have the same dimensions as the Source.

Algorithms are pretty cool to look at when they do things like this, right?

Pixels rearrange themselves and morph into different works of art


SPLOID is a new blog about awesome stuff. Join us on Facebook