Nature of code Final: pixel sorting

Inspired by Jeff Thompson’s GitHub (https://github.com/jeffThompson/PixelSorting), I’ve made my own tryings.

Firstly, I selected a video and automated it into a gif file through terminal. (Not necessary for this project, just did it for fun)

The original gif file is like this (yeah this is my friend Jade):

Based on what Jeff said:

This particular script loops through both the columns and the rows of the image, but it doesn’t pixel sort the entire column or row, if it did, the result would look more like a blank gradient than anything interesting. Instead for each column and row it looks for a pixel to start sorting on and then it looks for a pixel to stop sorting on — this makes the algorithm somewhat intelligent resulting in identifiable elements of the image being left untouched.

So I tried different mode to decide which pixel to start sorting on, and which to stop.

Black Mode:

Brightness Mode:

White Mode:

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *