Is there anyone who can help me understand how to change the angle of sorted pixels? Instead of sorting in horizontal lines, how would I implement something like this 45 degree angle?
Usually, pixel sorting compares (and possibly swaps) pixels[i] with either pixels[i+width] (for vertical only shifts) or pixels[i+1] (for row sorting).
You might consider comparing pixels[i] to pixels[i+width+1], which would sort them diagonally.
Draw a diagram of the i’th pixel and its surrounding 8 pixels. Work out what the indexes are for those other 8 pixels. That’ll help get you started.
Hello,
There are resources here:
https://processing.org/
This tutorial may be of interest:
https://processing.org/tutorials/pixels
And examples that come with the Processing IDE:
Search through the topics to glean some insight.
I did this in one of the topics here in the forum:
:)
Hi
i think rotating image to change the sort direction only works when the image is quadrate and angle value is particular such as 45 degree and so on
but how can i change the sort direction to some ordinary angle value such as 30/45 degree in any ordinary image?