YOUR ACCOUNT

Login or Register to post new topics or replies
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
I have seen this image shown here from this website here

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
So from the image of the previous post, my filter is not good, but I have not been able to fix it yet, as what I want is really something like this other example, apart from the first post

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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

Quote
SpaceRay wrote:
Thanks to Indigo Ray that suggested me to look at the Xia Script by Xirja I have found something interesting and that shows that, you can control how the bomber orders something and distributes something

Here xirja have used the tiles and to get that pattern have ONLY risen the value of the L range to 100 and changed variation to 5




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
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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

  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
And another example is this other filter that the problem is it has lots of repeating same color squares diagonally

PaintBlocks by SuKILLhoS

  Details E-Mail
emme
Posts: 718
Filters: 8
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. smile:)

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.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
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.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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

Quote
emme wrote:
The thing with randomness is that it's... random


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

Quote
emme wrote:
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 n


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

Quote
emme wrote:
. 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


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

Quote
emme wrote:
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.


Well, It can be a good idea, but I am sorry that I have no idea how to do it

Quote
Skybase wrote:
Four color theorem comes to mind.
https://www.wikiwand.com/en/Four_color...#/overview


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
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Quote
Your other two possible suggestions may be good, but I do not know how to do them, sorry


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.
  Details E-Mail
emme
Posts: 718
Filters: 8
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 smile:)
  Details E-Mail
emme
Posts: 718
Filters: 8
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 smile:)

Here's the script in its current state - messy, but it works!

non_repeating_cells_v001.ffxml
  Details E-Mail
emme
Posts: 718
Filters: 8
Just realized FF doesn't render out images with script errors, so this might not be very useful before its fixed. Anyway here's proof smile:)

  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Excellent work!
  Details E-Mail
Rachel Duim
So Called Tortured Artist

Posts: 2498
Filters: 188
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.
  Details E-Mail
emme
Posts: 718
Filters: 8
Perfect, thanks for fixing it Rachel!
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
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
  Details E-Mail
emme
Posts: 718
Filters: 8
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
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
Thanks very much for making it compatible well with map switch, will test it and see how it works, thanks again
  Details E-Mail
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?
  Details E-Mail

Join Our Community!

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!

Create an Account

Online Users Last minute:

36 unregistered users.