Base-3 Pattern Integers
Posted: October 23rd, 2017, 9:28 am
Something strange I thought of.
What if we trenary-ized patterns to make a "pattern integer"?
So like this:
Encoding
1. Take a pattern
2. Turn each row into a binary number:
3. Join them into 1 line:
4. On the end of each line and start of the string, append "2" to distinguish different rows:
5. Turn it into decimal:
Example 2:
Decoding
Pretty straightforward:
1. Take a code:
2. Turn it to Base-3
3. Put the rows, removing the first "2" splitting on each '2' and
4. Turn 2D array to pattern/RLE
I don't know if this is useful or anything, just wanted to post.
Any improvements?
What if we trenary-ized patterns to make a "pattern integer"?
So like this:
Encoding
1. Take a pattern
Code: Select all
x = 3, y = 3, rule = B3/S23
bo$o$3o!
Code: Select all
010
100
111Code: Select all
010100111Code: Select all
201021002111Code: Select all
379147Code: Select all
x = 10, y = 13, rule = B3/S23
4b2o$3b4o2$2b6o$3b4o2$2b2o2b2o$2obo2bob2o$3bo2bo3$4b2o$4b2o!
!
Code: Select all
200001100002
00011110002
00000000002
00111111002
00011110002
00000000002
00110011002
11010010112
00010010002
00000000002
00000000002
00001100002
0000110000Code: Select all
113094238779136186224404200800208066204840200024442844228088088284862Pretty straightforward:
1. Take a code:
Code: Select all
379147Code: Select all
201021002111Code: Select all
010
100
111Code: Select all
x = 3, y = 3, rule = B3/S23
bo$o$3o!
Any improvements?