![]()
MY problem is that I don’t really understand what @RichardDL 's code is doing!
Is it making the patterns for ONE gray scale (which one, 12??) or for all?
I suggested to make the result of brightness(fromPixel) to int to get 0 to 255 as a result.
Then we would need 256 different sets of patterns.
My approach
My approach is simple:
First Line of thought
PixelRepresentation[][] myList;holds the image as patterns (2D array)PixelRepresentationcontains a 2D array of the pattern (probably this is unnecessary because we have ListOfPermuts)
The 2nd Line of thought
ListOfPermuts[] permutsholds a 256 long list (one for eachint(brightness()))- ListOfPermuts holds an
ArrayListto hold the patterns for each brightness (different numbers)
The 3rd Line of thought
- To bring this together, we for loop-for loop over the image and fill
PixelRepresentation[][] myList;with brightnesses - We fill
ListOfPermuts[] permutswith permuts for each brightness - We display myList which uses the permuts with its brightness and animates over the patterns in its ArrayList
I hope this helps!
Chrisir