glider constructor

In my presentation I listed the idea of a glider constructor as a "research topic". When I put this up it was true, but then I implemented it not long afterwards. The reason was, that I was searching for a 3D glider then, and I wanted to be able to draw a shape that I had in mind and see if it works, at least approximately. The point is that I didn't want to draw the whole shape, but only one half of the profile. The rotational symmetry then would be calculated automatically and give the whole 3D glider.

So I wrote a little FreeBasic program where I could draw, calculate the 3D shape, and then let it run the time steps. But it soon was clear that I wouldn't be able to draw a shape that is stable. The thing always blew up over time, even it had made a few steps at the beginning. I wanted to know why and what was going on, so I did what I had had in mind anyway: implementing the glider constructor and constructing and displaying of the snm function.

Programwise this is no big deal: just let an array represent the snm function and set values in it according to the shifted glider. Of course it turned out that with a low resolution of this snm array there are many collisions: certain (n,m) pairs occur multiple times over the glider, at least approximately, and are then rounded to the same array location. This is no problem if the snm value at this coordinate is the same for all the occurances. But it leads to a problem if it is not, because then you can't decide to which of the two values snm to set to.

Explicitly in the program I did it as follows: the snm array is initialized with 0.5, displayed as grey. The glider is drawn in white (1) on a black background (0). So when the calculation of snm is finished and it is displayed, there are white and black dots on a grey background. The points where collisions occured are marked in red. I increased the resolution of the snm array and then it turned out that I really can draw a glider and let it run, even if the snm array looks rather chaotic, i.e. with many black and white dots mixed in wide areas. I also could confirm that with the generic smooth glider shape, this is not the case. There the black and white dots are nicely seperated. They would have to be of course, because the snm array that should come out in that case should simply look like our generic four parameter sigmoid snm function, like we have defined it in all our SmoothLife programs. There the 1 and 0 areas are seperated after all.

So, arbitrary glider shapes are not really possible, because of areas in snm where black and white dots collide. But the glider constructor is nonetheless useful, because the interesting thing now is: we can draw different glider shapes and see if we potentially would be able to define an snm function that generates them. The only property that they should have is seperated white and black areas. In the main program there would be a way to let snm be an array, transfer the calculated snm array from the glider constructor and see if it is really generated and runs.

Check it out in the FreeBasic directory!

Use it like this:
Draw a glider in the black square, then press space.
It will calculate the snm array and show the collisions (the little red dots can be hard to see).
The number of collisions is also displayed below it.
With zero collisions your glider should then appear below the original one.
With collisions you should see it blow up, i.e. see the square become more and more grey.
Press space again and you are again in drawing mode.
Now you can modify your glider, e.g. fill little holes or smooth the outline.
Then press space again to see if it has less collisions and how the areas where black and white dots are mixed have in- or decreased in size.
Or you press w or s to set a speed for your glider.
This of course leads also to a different snm array.
It can happen that with speed 0 there are collisions and with a speed >0 there are none.
Remember that the correct size for a glider also depends on the kernel size, i.e. the outer radius.
As a default it is set to 12 in the program, so your perfect glider is somewhere around 24x24 pixels in size.

Posted by ionreq 2012-04-27