SpaceRay
![]() |
||||||||||||
Posted: April 5, 2018 5:45 pm | ||||||||||||
SpaceRay
![]() |
Since long time ago I wanted to be able to make something similar to what is shown above here where it has random square based patterns with different colors that are NOT repeated nearby, I mean that the color is not repeated in the X or Y sides of the same color, it can be repeated in diagonally, but not more than once as in the example above
I have tried to use bomber, bomber plus and tiles, but I always get repeated colors patterns randomly Long time ago I made this filter Color squares with photos And as you can see here the colors are repeated in X or Y sides as seen here ![]() |
|||||||||||
Posted: April 5, 2018 5:52 pm | ||||||||||||
SpaceRay
![]() |
||||||||||||
Posted: April 5, 2018 5:59 pm | ||||||||||||
SpaceRay
![]() |
Already 5 years ago in 2013 I have put this thread
How can you control the distribution of the particles inside Bomber? I already tried to discover a way to do it in this thread, but failed to do it So now there are new ways to do things and I know that with FF 6 and FF7 there are new ways to use slaves components, and there are new greenified components, but I regrettably really do not know how to use them, so can not experiment or test them I think that probably the best way would be with bomber or bomber plus, as I want to put also images over the colors, but maybe there could be an alternative way with other components, for example using tiles, or any other way So, please, can you be so kind to tell me if there could be a way to do this as in the example of the first post in a random way? It would not only be random colors, also is needed for random images over the squares so they are not repeated in X or Y either I would like to have 7 or 8 different colors if possible to make it more random, and 7 or 8 images Thanks very much for any possible help, much appreciated |
|||||||||||
Posted: April 5, 2018 6:18 pm | ||||||||||||
SpaceRay
![]() |
I do not want to abuse from any of you, and do you work for me for free, so if needed I can pay you for the work
Now after writing the above I remembered from be end of the thread that there was this, but I could not make it work as I wanted
![]() The xirja filter is to make this ![]() But they are all the same color, or black and red, although the script letters are all different and not repeated |
|||||||||||
Posted: April 5, 2018 6:27 pm | ||||||||||||
SpaceRay
![]() |
I hvae been trying to search in the FF filter library for any possible filter that could make something similar in some way, but until now I have not found any
Circumsquare by Ramlyn That seems to have the same problem as my filter where some of the colors and shapes are repeated on X and Y sides ![]() |
|||||||||||
Posted: April 5, 2018 6:49 pm | ||||||||||||
SpaceRay
![]() |
And another example is this other filter that the problem is it has lots of repeating same color squares diagonally
PaintBlocks by SuKILLhoS ![]() |
|||||||||||
Posted: April 5, 2018 6:59 pm | ||||||||||||
emme |
The thing with randomness is that it's... random. These examples have a very limited selection of colors and tiles, so it's very unlikely that none of the colors will repeat when randomized. Perhaps if you randomized the pattern a million times, one of those patterns would have no repeating colors - or not. You wouldn't expect to never have repeating values when flipping a coin.
![]() So, a brute-force method would be to go one by one in a loop and check the neighbouring-cells to avoid repetitons. I guess you would actually only have to check two neighbours if you fill the cells in order, not sure without testing it. Anyway, i think that would get very slow, checking through all the iterations. Maybe there's a clever way to optimize this. Another way could be to carefully prepare smaller non-repeating patterns that can then be positioned and rotated to form a larger pattern. I'm sure there's been research done on this. Most likely there are existing algorithms to generate these kind of non-repeating patterns. I'll see what I can find at some point. |
|||||||||||
Posted: April 6, 2018 12:16 am | ||||||||||||
Skybase
![]() |
I was thinking of utilizing something like the hibert curve and an ordered, pre-defined set of colors that repeat. Maybe.
It's actually pretty complicated lol. Four color theorem comes to mind. https://www.wikiwand.com/en/Four_color...#/overview The other thing I was thinking of was designating colors into a 4 panel quadrant and rotating that 90 degrees for each new tile. |
|||||||||||
Posted: April 6, 2018 3:14 am | ||||||||||||
SpaceRay
![]() |
Maybe I have explained it wrong in some way, any of the colors CAN be repeated again many times in the randomized pattern, and is not a problem,
what I am telling is that 1 - as seen on the first post, NONE of the repeating colors are either on the top or below the same color, or is not at any of the sides 2 - what is wrong is as on second post example on the top left, that there is two red squares together, one below the other (and more like this) 3 - It can be repeated the same color diagonally, but not many times, because then it would create a link of the colors 4 - it would have a minimum of 7 or 8 different colors so there is less chance that the random colors are repeated nearby
Yes, I totally agree and is true that randomness is ...random, but as I see it from what I know, there is pure absolute random and also controlled random, I mean that you can give some help to the random to be able random with some possible rules or between some values, and I have seen that in some way controlled random is possible in FF on some filters, although I do not have enough FF knowledge and experience to do it myself
Sorry that I do not understand, I agree that the examples shown have a few colors so is a limited selections, but in that case is very likely that the colors will be repeated and not unlikely as you said, or I am understanding it wrong
As at start of this post, I agree that the colors can be repeated and I do not expect of course that the colors will not be repeated
Well, It can be a good idea, but I am sorry that I have no idea how to do it
Cool and interesting, now I remember I had already seen this long time ago, and I had forgot it, but how can this be applied to FF? Your other two possible suggestions may be good, but I do not know how to do them, sorry |
|||||||||||
Posted: April 7, 2018 5:16 pm | ||||||||||||
Skybase
![]() |
We don't know how to do them either lol. It's why we're merely suggesting ideas but with no idea if we can really implement this. |
|||||||||||
Posted: April 7, 2018 9:49 pm | ||||||||||||
emme |
I just thought of a pretty simple solution. Not sure yet if it will work or not. Basically you would generate a list of integers in a script, each number representing a color.
For each step, generate a random number (in the range of colors used) and compare it to values in the list at x-1 and x-row_width (the cells on the left and above the current cell) until a new color is found. Repeat for row width * row height and you should have a sequence of colors that won't repeat left-right-up-down when rearranged onto a grid. I'm probably missing something obvious here (tired lol), so anyone feel free to point it out. I'll try this out later and see if it actually makes any sense ![]() |
|||||||||||
Posted: April 8, 2018 5:05 am | ||||||||||||
emme |
Ok, got it working... sort of. Ended up using a 2d array instead but the basic idea is the same. The script does throw some errors (array index out of bounds I guess), but I'm too bad/lazy to fix this right now. If anyone actually competent at scripting wants to clean it up - feel free
![]() Here's the script in its current state - messy, but it works! non_repeating_cells_v001.ffxml |
|||||||||||
Posted: April 8, 2018 3:01 pm | ||||||||||||
emme | ||||||||||||
Posted: April 8, 2018 3:10 pm | ||||||||||||
Skybase
![]() |
Excellent work!
|
|||||||||||
Posted: April 9, 2018 10:40 am | ||||||||||||
Rachel Duim
![]() |
Agreed great work, I figured the only way to do this was in a regular language where you could easily lookup the previous color cell and the cell above. Here is a fix with no errors by doing array boundary checking.
non_repeating_cells_v002.ffxml Math meets art meets psychedelia. |
|||||||||||
Posted: April 9, 2018 3:06 pm | ||||||||||||
emme |
Perfect, thanks for fixing it Rachel!
|
|||||||||||
Posted: April 9, 2018 6:15 pm | ||||||||||||
SpaceRay
![]() |
Thanks really very much emme for taking the time to make it and Rachel for fixing it, I will see how it works and tell you later. It seems a great work from the example shown
|
|||||||||||
Posted: April 10, 2018 1:50 am | ||||||||||||
SpaceRay
![]() |
I have seen it and is a really a great work and works right, and I think is a good starting point to make it better, because as it is now, you can not select and define what colors to use, as it is using the spectrum component, but maybe using the gradient (specially the great one made by Rachel Duim with many colors) you may be able to define and limit the colors you want to use
I have to try this also with bomber, using this as chance configurator or as coloring Thanks again for making it |
|||||||||||
Posted: April 11, 2018 2:09 am | ||||||||||||
emme |
I've modified the script slightly to have the output values in 0-1 range. Works well with map switch now, so you can easily choose all the colors.
non_repeating_cells_v003.ffxml |
|||||||||||
Posted: April 11, 2018 11:16 am | ||||||||||||
SpaceRay
![]() |
Thanks very much for making it compatible well with map switch, will test it and see how it works, thanks again
|
|||||||||||
Posted: April 12, 2018 6:04 pm | ||||||||||||
Cato99
Posts: 29 |
Emme, I love using your "non_repeating_cells_v003" filter for getting random colors. I have another question for this one - if I wanted to place another set of different colored shapes, say a smaller circle on top of each of the square tiles, how would I go about this, ie. also making the circles random colors, but different colors to the base of the squares which they are on top of?
|
|||||||||||
Posted: June 18, 2021 9:22 am |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,533 Posts
+31 new in 30 days!
15,348 Topics
+73 new in year!
36 unregistered users.