# Find other swords down the waterfall

This is another old pattern I generated with a 1D cellular automaton:

To me it looks like a sword hidden in a waterfall.

The neighborhood of a cell looks like this:

What is the rule behind this pattern?

Find at least one other sword down below and show what it looks like.

Edit The last part of the question doesn't really fit, so I accepted the first answer, stating the rule. I will post the pictures of other 'swords' mysefl to show what I meant. The title of the question can be interpreted figuratively now, only meaning 'find the rule to generate the pattern further'.

Btw, this is what I meant by 'other swords':

• Not sure what you mean by find at least one more sword and show what it looks like. Sep 27, 2016 at 23:38
• @gtwebb, to find other swords one needs to actually generate this automaton Sep 27, 2016 at 23:42
• Do you have a generator you're using? A quick online search and they seem to deal just with 1 generation. Sep 27, 2016 at 23:51
• @gtwebb, I use a Mathematica program I made. I think it would be more interesting to wait for someone to do it on their own Sep 27, 2016 at 23:54
• IMO the second requirement is more suitable for programming puzzles and code golf but there is enough cross over that I'm sure someone will do it. Sep 28, 2016 at 0:00

I'm not sure how the rules are written but it seems to be either

2nd generation alive with no first generation

or

A number of 1st generation alive with no second generation (100,010,001,101,111)

Image

This is based on gtwebb's answer, so please don't treat this as an answer in its own right.

Quick and nasty Microsoft Excel VBA code to generate image:

Sub RunIt()
Application.ScreenUpdating = False
Dim r As Long
Dim c As Long
Dim cnt As Integer
Cells.Interior.Color = xlAutomatic
Cells(2, 8000).Interior.Color = vbRed
r = 3
Do While r < 500
For c = 8000 - r To 8000 + r
cnt = 0
If Cells(r - 2, c + 0).Interior.Color = vbRed Then cnt = cnt + 4
If Cells(r - 1, c - 1).Interior.Color = vbRed Then cnt = cnt + 1
If Cells(r - 1, c + 0).Interior.Color = vbRed Then cnt = cnt + 2
If Cells(r - 1, c + 1).Interior.Color = vbRed Then cnt = cnt + 1
If cnt = 1 Or cnt = 2 Or cnt = 4 Then
Cells(r, c).Interior.Color = vbRed
End If
Next
r = r + 1
Loop
Cells(1, 8000).Select
Application.ScreenUpdating = True
End Sub

First 500 iterations (generated while the VBA code was working sideways - the code above has been modified to work downward):