Pixels Rearrange Themselves And Morph Into Different Works Of Art

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 rearranged 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 colour 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

The Cheapest NBN 50 Plans

It’s the most popular NBN speed in Australia for a reason. Here are the cheapest plans available.

At Gizmodo, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.