NNN Study

I’ve recently had a reawakened interest in Next Nearest Neighbor patterns and fractals. My previous work was to randomly generate NNN rules and then browse through the results, looking for interesting designs. But now I am wondering what can be done to “program” a rule, so as to produce a desired pattern or fractal.

Constructing a rule is to construct a 32 bit value, where each bit represents how a new dot responds to a certain pattern of 5 dots above (or below) it. The rule could be represented as a 32 bit binary value, but an four 8 bit values are more convenient. It helps me to have a spreadsheet like so:

Screenshot from 2018-08-28 13-57-36.png

A simple but dynamic example indicated above is rule 0.0.1.4. If we start with line

O O O O X O O O O

then the rule produces
O O O O X O O O O
O O O X O X O O O

This seems rather simple, but if we start with a random line of bits, and continue on the process for a lot more steps, we get something like so (with the lines come up from the bottom):

nnn000_000_001_004.png

Zooming a little closer, we see:

Screenshot from 2018-08-28 14-04-18.png

You can see a pattern like Serpinski’s Triangle owing to the fact that the rule allows the pattern to repeat as we progress to enough lines.

O O O O X O O O O
O O O X O X O O O
O O X O O O X O O
O X O X O X O X O

On the other hand, there is additional variety as the patterns, starting in different parts of the random line, collide with each other. The rule produces varying effects at various collision borders. I think it would be helpful to my study to be able to start with just a single dot, rather than multiple lines, but I need to do a small amount of additional programming first.

For the graphics generation, I had to dust off my old autom program written in Haskell. The program’s dependencies currently will not work with Debian 9, so I just installed Debian 8 on an old laptop and ran the program from the laptop.

I do not have time to write more on this subject today, but I here are a few additional constructed patterns for fun:

0.0.1.2

O O O O X O O O O
O O X O O X O O O

nnn000_000_001_002

This one is a bit more complicated:

48.16.88.44

nnn48_16_88_44

Zooming in, we see:

Screenshot from 2018-08-28 14-29-22.png

Posted in NNN

1 thought on “NNN Study”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s