I just learned about displacement maps.
Please accept this apology in advance.
Render render render!
Simeis 147: Pixel sorting algorithm comparison.
Kim Asendorf recently released his pixel sorting code. This was incredibly exciting for me because his images were the inspiration for my own venture down the pixel sorting road.
I decided to run an image of Simeis 147 (a supernova remnant) through both pieces of code to compare the outputs and highlight the differences and similarities between them. The output from my code is on top, Kim’s is on the bottom.
The code that I wrote only sorts in one direction at a time, right to left, from bright to dark. If I want the lines to appear vertically I have to feed the image into the algorithm rotated 90degrees. Kim’s will sort both vertically and horizontally at the same time, but for reasons that I don’t yet understand, the horizontal sorts are more prominent.
My code also runs on whats known as the quick sort algorithm. When I want to move certain pixels, I tell my code to grab a range of values determined by brightness, rgb, saturation, or hue and plug them into the quick sort. Quick sort divides up the array into tiny pieces so that the computer can manage them more efficiently. This is very important. Even with an image that is only 1280x850 pixels, that ends up being over a million individual pixels to rearrange. The image I sorted for the File Arts was roughly 7000x3000 pixels, which ends up at a staggering 21 million.
As far as I can tell, Kim’s is running on a sorting method that he constructed himself.
If I understand it right, it will sort from the first not-black value if finds in a row or column until it reaches a user-set black value. Then it moves on in the same row/column to find a value that is less than a user-set brightness value, and sort that pixel until it encounters the threshold. Finally it will search for the first not-white value and sort that until it reaches the white value set by the user.
I tried to grab a set of similar values using both pieces of code; I think the results are remarkably similar. It’s also interesting to see how two different approaches can yield similar yet minutely different outcomes. Isn’t code great?!
If you’d like to see a copy of my code and read a bit more about my process, it’s now available (along with the aforementioned 21million pixel image) for just $5 over at The File Arts. http://www.thefilearts.com
The images that science produces of natural and scientific phenomenon are truly awe inspiring. Adam Ferriss takes astronomy pictures and puts them through a quicksort algorithm, adjusting values and repeating the process, until the desired result has been achieved. He uses mathematics to make art from science, adding a sense of bedazzlement and ambiguity to the source material. Read the edition description on The File Arts for more art vs science.
Now available in extreme HD; the image is 3034 x 7748 and would not fit on this Tumblr post as one image. You really have to see it at full resolution to admire the intricacy and detail of the picture. And to get lost in this galaxy of shifting stars.
This edition is priced at the popular and affordable amount of $5,-. For this you get the full download, containing: the final rendered file of 3034 x 7748 pixels and the edited PSD file. The accompanying PDF illustrates the process and the code used to make the piece. And even the source code and the original source images from NASA are included.
Check me out on The File Arts! This is the biggest image that I’ve ever sorted. The 100% details of this are crazy! There’s even some premade hi-res ipad/iphone/desktop wallpapers. My heavily commented source code is also included in this packet so you can even get started sorting your own images!