Pattern viewer for forum threads

For discussion directly related to ConwayLife.com, such as requesting changes to how the forums or home page function.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

This either doesn't generate a period map at all or generates a tiny one:

Code: Select all

x = 782, y = 688, rule = B2n3-k4ej5ey6-e78/S2n3-jk4-cjnwy5cky678
627b3o$626bobobo$626b4obo$627b5o$626bob3o$626bob3o$627b3o2$627b4obo$
630bo2$629b3o$631bo$630bo49$627b3o$626bobobo$626b4obo$627b5o$626bob3o$
627b4o$630bo$627b2o$258bo367bobo$107bo120b4ob3o22b2o26bo123bo214bob3o$
3bo61bo39bobo19bo30bo4b2o24bo30bo4b2o3b4o17bo3b5o22bo3bo2bo23bo2bo2bo
24bo8b2o20bo30bo30bo3bo26bo30bo30bo3bo26bo30bo30bob5o$2b8o54b7o36bo18b
6o25b8o23b5o26b7o2b7o15b4o2b4o21b8obo3bob4o12b8o23b12o19b6o25b6o25b4ob
o3bo21b5o3bo22b7o24b4ob3o23b6o25b6o25b8o$b6obo3bobo48b6ob3obo2b2o2bo
43b5o26b8o23b6o25b7ob3obob4obo11b13o18b10o2bo3bobo12b9o22b6ob5o19b10o
3bobo15b6o25b6obo2b2o19b8o23b7o24b9o22b5o26b11o20b8o$9o3bobo47b9obo3b
7o41b7o2bo21b11o20b10o21b9o4bob4obo10b9o3b2o17b6ob5o4b3obo10b9o22b10ob
3o17b10o3bobo15b10o21b8o23b9obo20b9o22b6o25b6o25b11o20b6o2bo$b8obo52b
11ob2ob4o43b5o2bo23b6obo23b5o2b2o22b6ob3o4bobo14b6o3b2obo18b5o4b2o2bob
3o13b7o24b8o23b6o4b2o2b2o15b11o20b5ob2obo21b5o2b2o22b5obo24b10o21b4obo
25b6o2b2o21b6o$2bo2b4o55bo4b2o4b6o45bo30bo4b2o24bo30bo13bo16bo30bo4bob
2o6b3o13bo5b2o23bo6bo23bo3bo4b5o17bo4bobo23bo3bo26bo3b2o2bo22bo30bo30b
o2bo27bo30bo$6bo63bo7b4o145bo68bobo18bo60bo4b2obo146b3o90bo$78bo218bo
7$122b2o$120bob2o$118bo2bo2bo$119b4o$120bob2o$120b3o$119bob4o$120b4o
503b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo501bob
3o$121b3o502bob2obo$627b3o$628b4o$627bob5o$627bob4o$628bo3bo$631bo2$
631bo14$122bo$121bobob2o$120b5o$119b6o$120b5o502b3o$120b4o502bobobo$
119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o503b4o$626b5obo$
627b4o$627b3o$627bo$630bo$630b3o$628bob2o$629b4o$630b3o5$119bo$121bo$
118b2o$119b3o$120b2o$120b3o2$120b2o$120b2o$119b5o$120b2o$119bob3o$119b
ob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo
501bob3o$121b3o502bob2obo$626bob2obo$626bob3o$626bob4o$627b5o$628b4o$
629b3o$629b3o$629bo5$626b2o$122b2o503b2o$118bo4b2o503bo$119bo3b2o$118b
o3b2o3$119b2o$118b3o$118b2o$119bobob2o$122b4o$121b5o$120b4o503b3o$120b
3obo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o
503b4o$626b6o$627bo$628bo$626b2o10$120bo$119bo6$124bo$122bobo$121b2o$
121bo$119b6o$119bob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$119bob
4o502b5o$120bobobo502b4o$121b3o503bobobo$629b2o$628bo$628bobo$627b3o2$
631bo$627bob2obo$628bob4o$627b2obo12$121bo2b2o$120b6o$119bob4o$119b6o$
120b4o$119bob3o503b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b5o$
120bobobo502b4o$121b3o502b4obo$626b5o$626b5o$625b7o$625bob7o$626bobob
2o$629b3o16$122b2o$123bo$123bo$121b3o$122b2o503b3o$120b3obo501bobobo$
119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o502bob2obo$626bo
b2obo$626b4obo$628b3o$626bo2bo$629bo$628b3o$630b2o$630bo$627b2o$627bob
o$626bobo6$119bo$118b2o$121bo$118b2o3bo$123bo$122b2o$121b3o$120b4o$
119bob3o$119bob3o503b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b
5o$120bobobo502b4o$121b3o504b2o$626b3o$627b4o$627b2o$630b2o$629b3o$
629bobo$628b3o$629bo10$121bo$120b3o$119bobo$119b3o$119b2o$122b2o$120b
4o$122b3o$121b2o504b3o$120b4o502bobobo$119b5o502b4obo$119bob4o502b5o$
120bobobo501bob3o$121b3o503b3obo$627b3obo$627b4o$627b3o$627b2o$627bo$
627bo3b2o$629bo$631b2o$631bo6$122bobo$121bobo$122b2o$120bo$119b2o$120b
3o$121bo$121bo2bo$120b3o$119bob4o$119bob2obo$119bob2obo502b3o$120b3obo
501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o503b2o
$627b3o$627bo$627bo$627b2o16$119b3o$119b2obobo$117b7obo$119b7o$120b5o$
120b5o$119bob4o502b3o$120b4o502bobobo$119b5o502b4obo$119bob4o502b5o$
120bobobo501bob3o$121b3o503b3obo$627b4o$626b6o$626b4obo$625b6o$625b2o
2bo12$120bob2o$117b4obo$118bob2obo$119bo2$121b3o$120bobo$122bo$120b2o$
119bobobo503b3o$120b4o502bobobo$119b5o502b4obo$119bob4o502b5o$120bobob
o501bob3o$121b3o502bob2obo$626b6o$629bo$628b2o$626bobo$626bo6$631bo$
630bo10$123b2o$122bo$123bo$119b6o$120b4o503b3o$120b3obo501bobobo$119b
5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o503b4o$625b5o$625b4o
$626b2obobo$631b2o$630b3o$630b2o3$627b2o3bo$626b2o3bo$122bo503b2o4bo$
122b2o503b2o$123b2o5$121bo$119b3o$119b3o$119b4o$119b5o$119b4obo$120b3o
bo$119bob2obo$119bob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$119bob
4o502b5o$120bobobo501bob3o$121b3o502bob2obo$627b3obo$629b2o$627b5o$
629b2o$629b2o2$628b3o$629b2o$629b3o$631b2o$629bo$631bo5$118b3o$118b4o$
119b2obo$118b3o$120bo$123bo$121b3o$120b4o$118bob5o$120b4o503b3o$120b3o
bo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo502b4o$121b3o502b5o
$626b6o$626b5o$624b2obobo$628bo14$119bo2$119bo$118bo3bo$118b4obo$117b
5obo$119b4o$121b3o$119bob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$
119bob4o502b5o$120bobobo501bob3o$121b3o503b4o$626b4obo$628b3o$627b2obo
$628b4o$626bo2bo2bo$627b2obo$627b2o7$453bo253bobo$124bo90b3o146bob2o4b
o60bo18bobo68bo183bobo$128bo30bo27bo2bo30bo30bo22bo2b2o3bo26bo3bo23bob
o4bo17b5o4bo3bo23bo6bo23b2o5bo13b3o6b2obo4bo30bo16bo13bo30bo24b2o4bo
30bo25bo4bo47bo3bob4o4bo61bo$124b6o21b2o2b6o25bob4o21b10o24bob5o22b2o
2b5o21bob2ob5o20b11o15b2o2b2o4b6o23b8o24b7o13b3obo2b2o4b5o18bob2o3b6o
14bobo4b3ob6o22b2o2b5o23bob6o23bo2b5o22b2ob6o44b5o3b3ob6o57bob3o$122bo
2b6o20b11o25b6o25b6o22b9o20bob9o23b8o21b10o15bobo3b10o17b3ob10o22b9o
10bob3o4b5ob6o17b2o3b9o10bob4obo4b9o21b10o20b11o21bo2b7o18bobob9o43b4o
2b3o3b7o52b2o3b2ob2o$122b8o20b11o26b5o22b9o24b7o23b8o19b2o2bob6o25b6o
15bobo3b10o19b5ob6o22b9o12bobo3bo2b10o18b13o11bob4obob3ob7o25b6o23b8o
26b5o18bobob9o46b5o2b9o56bo3bo$121b8o25b6o25b6o23b3ob4o24b7o22bo3b5o
21bo3bob4o25b6o25b6o19b12o23b8o12b4obo3bob8o21b4o2b4o15b7o2b7o26b5o23b
8o25b6o22b9o46bob2ob11o$121b5obo30bo30bo26bo3bo30bo30bo26bo3bo30bo30bo
20b2o8bo24bo2bo2bo23bo2bo3bo22b5o3bo17b4o3b2o4bo30bo24b2o4bo30bo21b2o
3b2o2bo48b3obo2b2o4bo$121b3obo214bo123bo26b2o22b3ob4o124b4o$122bobo
367bo$122b2o$120bo$120b4o$120b3obo$119b5o$119bob4o$120bobobo$121b3o8$
123bo$123bo$121b5o$123bo$123bo7$117b2obobo$121b4o$119b5obo$118bob5o$
118b6o$120b4o$121b3o$120b3obo$120b3obo$119b5o$119bob4o$120bobobo$121b
3o50$116b4o$116b3o$116bob2ob2o$118bo2bo$121bobo$122bobo$120b4o$119bob
3o$120b3obo$119b5o$119bob4o$120bobobo$121b3o!
This also takes a while (30 seconds plus on my end) to fully identify after it recognises periodicity, and also produces the same kind of map:

Code: Select all

x = 6, y = 47, rule = B2in3-kq4cjy5eky6-e78/S3-jk4-cjnw5ce678
3b2o$2b2o$b4o$b4o$5o$b5o$2b3o$3bo25$2bo$2bo6$bobo$b4o$b4o$b4o$5o$b5o$
2b3o$3bo!
Would it be possible to customize colors associated with the period map, such as the background? I'd personally prefer it if it was also darker by default to fit better with the viewer's default settings.

Also, could some method be implemented to access prior Identify results if they are closed, without having to simulate the pattern a second time (for larger or high-period patterns, this can take a lot of time)? While the output values and such are still accessible in the help section, there's no way to get back to the period map at all.

I'd also find it useful if there existed some way to zoom into maps, since they can contain intricacies which may warrant further examination:

Code: Select all

x = 4, y = 3, rule = B2k3aikq4ej5iy6i/S2-ci3-acey4iy5cnq7c
2o$o2bo$b3o!

Code: Select all

x = 7, y = 5, rule = B2in3aijqr4ikqz5r6n/S2aek3-ae4city5-ejqy6a7e
2bo$b3o$2obo$bobo$4bobo!
And a random, out-there idea: since proper triangular and hexagonal grid support for period maps is on the backlog, I wonder if it'd be possible to implement period map support for PCA rules as well. They're ultimately just two-state rules taking place on a kis-square tiling, so it should somehow be possible for them to be displayed as such on a period map somehow.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

rowett wrote: December 24th, 2022, 5:01 am It's been 3 years and no one yet figured out how to enable secret snow...
I actually accidentally discovered how to enable it earlier this year:
muzik wrote: August 25th, 2022, 6:30 am

Code: Select all

x = 10, y = 5, rule = Critters
#C [[ RLE input o$bo$bo$o! ]]
#C [[ PASTET EVERY 32 ]]
#C [[ PASTE input -11 0 ]]
#C [[ ZOOM 8 ]]
$bo$2bo6bo$2bo6bo$bo!
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

muzik wrote: December 24th, 2022, 10:52 am This either doesn't generate a period map at all or generates a tiny one
The map isn't drawn because in a popup Viewer it's less than 1 cell per pixel.
muzik wrote: December 24th, 2022, 10:52 am This also takes a while (30 seconds plus on my end) to fully identify after it recognises periodicity, and also produces the same kind of map
The map issue is the same as above. The 30 seconds is because the pattern bounding box is large so there are a lot of calculations to do. At some stage I'll refactor the calculation code so it displays a progress bar and doesn't hang LifeViewer during the calculation.
muzik wrote: December 24th, 2022, 10:52 am Would it be possible to customize colors associated with the period map, such as the background? I'd personally prefer it if it was also darker by default to fit better with the viewer's default settings.
Possibly though that would be more of a Viewer preference than a pattern preference. Viewer preferences are a future item.
muzik wrote: December 24th, 2022, 10:52 am Also, could some method be implemented to access prior Identify results if they are closed, without having to simulate the pattern a second time (for larger or high-period patterns, this can take a lot of time)? While the output values and such are still accessible in the help section, there's no way to get back to the period map at all.
It's on the backlog.
muzik wrote: December 24th, 2022, 10:52 am I'd also find it useful if there existed some way to zoom into maps, since they can contain intricacies which may warrant further examination
Haven't decided on this yet. I was also considering being able to download the map as an image. In which case you could put it into your favourite image viewer and zoom.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

muzik wrote: December 24th, 2022, 1:08 pm
rowett wrote: December 24th, 2022, 5:01 am It's been 3 years and no one yet figured out how to enable secret snow...
I actually accidentally discovered how to enable it earlier this year:
muzik wrote: August 25th, 2022, 6:30 am

Code: Select all

x = 10, y = 5, rule = Critters
#C [[ RLE input o$bo$bo$o! ]]
#C [[ PASTET EVERY 32 ]]
#C [[ PASTE input -11 0 ]]
#C [[ ZOOM 8 ]]
$bo$2bo6bo$2bo6bo$bo!
Cool, so did you figure out the formula?
User avatar
wirehead
Posts: 304
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Pattern viewer for forum threads

Post by wirehead »

rowett wrote: December 24th, 2022, 2:49 pm
muzik wrote: December 24th, 2022, 1:08 pm
rowett wrote: December 24th, 2022, 5:01 am It's been 3 years and no one yet figured out how to enable secret snow...
I actually accidentally discovered how to enable it earlier this year:
muzik wrote: August 25th, 2022, 6:30 am

Code: Select all

x = 10, y = 5, rule = Critters
#C [[ RLE input o$bo$bo$o! ]]
#C [[ PASTET EVERY 32 ]]
#C [[ PASTE input -11 0 ]]
#C [[ ZOOM 8 ]]
$bo$2bo6bo$2bo6bo$bo!
Cool, so did you figure out the formula?
It's a nice Easter egg... let's keep it a secret 8)

Also a legit reason to keep the code obfuscated!
Langton's ant: Can't play the drums, can be taught.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

rowett wrote: December 24th, 2022, 2:49 pm Cool, so did you figure out the formula?
Not quite yet, since my last attempt at actually cracking it was from late 2021: viewtopic.php?f=12&t=3316&p=138559#p138559
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

I've been wondering for the last few days if there'd be any merit in trying to define and calculate volatility for spaceships as well as oscillators. There are examples aplenty of spaceships which have different periods in different parts, with three notable examples that come to mind being the period-8 tagalong for two period-4 swans:

Code: Select all

x = 28, y = 28, rule = B3/S23
5b2obo7b3o$5bo3bo6bo$5bo4bo7bo7b2o$7b2o7bobo4b2obo$9bobo4b3obo2b2o$3o
12bo3b2o2b2o$o10b2ob4ob2o$3bo8b7o$o2bo$bo2bo$2bo$4bobo$6b2o$7bo6b3o$6b
2o6bo2bo$5b3o5bo3bo$2ob2ob2o7bo$o3bob2o9b2o$ob3o2bo5bo6bo$5b2o8b3o3bo$
4b3o14bo$19bo$20bo$3b3o$3b3o2$2b2o$2bo!
the 55-cell c/3 spaceship with a p3 frontend and p9 backend:

Code: Select all

x = 21, y = 14, rule = B3/S23
6b3o3b3o$2bob2o3bobo3b2obo$b3o3bobobobo3b3o$o3bo4bobo4bo3bo$bo7bobo7bo$8bobob
o$8bobobo2$10bo$9bobo$7b2o3b2o$7b2o3b2o$6bo7bo$7bo5bo!
as well as the period-21 "doo-dah" tagalong for the period-7 weekender:

Code: Select all

x = 16, y = 27, rule = B3/S23
3o10b3o$obo10bobo$3o10b3o$b2o4b2o4b2o$6bo2bo$2bobo6bobo$3b10o$5bo4bo$5bo4bo$
5bo4bo6$3b3o4b3o$2bo2bo4bo2bo$2bo3bo2bo3bo$2bo2bo4bo2bo$3bobo4bobo3$2o12b2o$
3o10b3o$3o10b3o$o14bo$bo12bo!
As these spaceships exhibit different types of periodicity in different regions, it does seem as though a concept of strict volatility would be valuable in describing the behaviour of these spaceships.

Of course, with spaceships that allow for more circuitry-like structures to be created via reactions with other patterns, we can get considerably more complex spaceships with much different potential values for strict volatility:

Code: Select all

x = 111, y = 148, rule = B3/S23
66b2o$65b2ob2o5b3o$65bo2b2o10bo$65b4o6b2o3b3o$65b2o4b2o3b2o2bobo$65b2o
4b2o3b2o2bobo$65b4o6b2o3b3o$65bo2b2o10bo$45b2o18b2ob2o5b3o$45bobo6b2o
2bo7b2o18b2o$44bo2b2o5b2obo2bo25bobo6b2o2bo$22b2o21b2o3bo4bo4bo24bo2b
2o5b2obo2bo$22bobo6b2o2bo9bo5bo4bo2bobo24b2o3bo4bo4bo$21bo2b2o5b2obo2b
o7bo5bo4bo2bobo24bo5bo4bo2bobo$22b2o3bo4bo4bo7b2o3bo4bo4bo25bo5bo4bo2b
obo$22bo5bo4bo2bobo5bo2b2o5b2obo2bo25b2o3bo4bo4bo$22bo5bo4bo2bobo6bobo
6b2o2bo26bo2b2o5b2obo2bo$22b2o3bo4bo4bo7b2o39bobo6b2o2bo$21bo2b2o5b2ob
o2bo48b2o$b2o19bobo6b2o2bo$bobo6b2o2bo7b2o$o2b2o5b2obo2bo$b2o3bo4bo4bo
$bo5bo4bo2bobo8b2o8b2o20b2o$bo5bo4bo2bobo8b2o8b2o20b2o$b2o3bo4bo4bo$o
2b2o5b2obo2bo77b2o$bobo6b2o2bo79bobo6b2o2bo$b2o90bo2b2o5b2obo2bo$94b2o
3bo4bo4bo$94bo5bo4bo2bobo$13b2o6b2o22b2o6b2o39bo5bo4bo2bobo$13b2o6b2o
22b2o6b2o39b2o3bo4bo4bo$93bo2b2o5b2obo2bo$94bobo6b2o2bo$94b2o$34b2o$
34b2o2$82bo$17b2o63b2o$17bobo6b2o2bo50bobo$16bo2b2o5b2obo2bo$17b2o3bo
4bo4bo$17bo5bo4bo2bobo$17bo5bo4bo2bobo$17b2o3bo4bo4bo$16bo2b2o5b2obo2b
o$17bobo6b2o2bo$17b2o17$57bobo$58b2o$58bo30$17b2o$17bobo6b2o2bo$16bo2b
2o5b2obo2bo$17b2o3bo4bo4bo$17bo5bo4bo2bobo$17bo5bo4bo2bobo$17b2o3bo4bo
4bo$16bo2b2o5b2obo2bo$17bobo6b2o2bo$17b2o5$94b2o$94bobo6b2o2bo$93bo2b
2o5b2obo2bo$5b2o22b2o6b2o30b2o23b2o3bo4bo4bo$5b2o22b2o6b2o30b2o23bo5bo
4bo2bobo$94bo5bo4bo2bobo$94b2o3bo4bo4bo$b2o90bo2b2o5b2obo2bo$bobo6b2o
2bo47bobo29bobo6b2o2bo$o2b2o5b2obo2bo44bo3bo28b2o$b2o3bo4bo4bo43bo4bo$
bo5bo4bo2bobo24b2o16bo4bo8b2o$bo5bo4bo2bobo24b2o16bo3bo9b2o$b2o3bo4bo
4bo44bo2bo$o2b2o5b2obo2bo$bobo6b2o2bo7b2o$b2o19bobo6b2o2bo$21bo2b2o5b
2obo2bo48b2o$22b2o3bo4bo4bo7b2o39bobo6b2o2bo$22bo5bo4bo2bobo6bobo6b2o
2bo26bo2b2o5b2obo2bo$22bo5bo4bo2bobo5bo2b2o5b2obo2bo25b2o3bo4bo4bo$22b
2o3bo4bo4bo7b2o3bo4bo4bo25bo5bo4bo2bobo$21bo2b2o5b2obo2bo7bo5bo4bo2bob
o24bo5bo4bo2bobo$22bobo6b2o2bo9bo5bo4bo2bobo24b2o3bo4bo4bo$22b2o21b2o
3bo4bo4bo24bo2b2o5b2obo2bo$44bo2b2o5b2obo2bo25bobo6b2o2bo$45bobo6b2o2b
o7b2o18b2o$45b2o18b2ob2o5b3o$65bo2b2o10bo$65b4o6b2o3b3o$65b2o4b2o3b2o
2bobo$65b2o4b2o3b2o2bobo$65b4o6b2o3b3o$65bo2b2o10bo$65b2ob2o5b3o$66b2o
!

Code: Select all

x = 130, y = 133, rule = B36ce7c/S23-y
103bo$102bobo$102bo2bo$100b2obob2o$100b2obob2o$101bob2obo$102b4o$104bo
34$100bo$99b3o$98bo2bo$97b5o$98bo2bo22b3ob2o$99bob2o22bobobo$101bo23bo
3bo$126bobo$127bo8$115bo$115bo2b2o$115bo2b2o3$68bo$68b3o$68b3o40bo$69b
obo38bobo$65b3o45b2o$66b2o40bo2bo$66bo3bo40bo3bo$108b2o4bo$98b2o10bo$
100bo11b2o$97bo2bo$99bobo$96b3o$97b5o$100bo3$47bo$44bo3b2o$47b3o26b2o$
48b3o24bo$45b2o28b3o$44b3o29bo$46bo31bo$29b2ob2o20b2o21b3o$29b2obob2o
17bo2bo20b6o$29bobo3bo18b2o25b2o$34b2o2$31b3o4$2bo$2b2o49bo$b2ob2o46bo
bo$bo51bobo$3o3bo43bo2b2o$3bo46bo4bo$4b2o13b2o29bo3b2o$o18b2o31bob2o$b
o17b2o2$19b3o88bo$108bo3bo$104bo3bo3bo$102bobo4bo3bo$103b2o5bob3o$45bo
60bo3b3o$43b2obo60bo2bo$43bo3bo$44bobo$6b3ob2o$10b2o9$35b3o2bo$39b2o3$
24b2o$24b2o$24b2o2$24b3o!
I'm not too sure as to how these would be calculated though. I assume that you would first determine if the speed of the spaceship can be simplified, and if so, keep comparing the original pattern with copies of itself advanced at the "simplified period" and noting the cells which are different, up until we complete a true period cycle? So for the 3c/9 example above, we'd remember the original pattern, and then compare it to a copy of itself at T=3 and T=6, with the original copy moved upwards accordingly. The frontend would match up each time due to being p3 in itself, but differences would be detected in the back.

Just some random thoughts on my end, though. I don't know if anyone has actually tried defining or implementing anything like this before but it does seem like something that would communicate valuable information.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

wirehead wrote: December 24th, 2022, 10:20 am 1) Infinite grids. The first (and probably best) approach would be to use Hashlife. I found this very simple implementation in Python and although it is missing a few key features (editing, multistate support, etc.) it looks pretty easy to port to Javascript once the memoization technique is figured out (which isn't too difficult).
As a good practice it's always worth evaluating the cost vs benefit. The cost, in this case, is high. Hashlife would introduce significant changes to LifeViewer's design in many key areas (for example: editing, rendering, snapshots etc.).
On the benefit side it's debateable since LifeViewer's primary function is visualisation of patterns in the browser. If you want to do very large or long simulations then you're much better served with a purpose-designed tool for that: Golly.
wirehead wrote: December 24th, 2022, 10:20 am 2) Incremental rule recompilation. Previously you mentioned that LifeViewer likes @TREE rules better than ones only with @TABLEs, because @TABLEs are slow. Wouldn't memoizing the rule evaluator function speed it up considerably?
This is an good example of where a simple prototype would be worth trying. Why not have a go implementing a TABLE algo with memoization and see what sort of speed increase is possible.
wirehead wrote: December 24th, 2022, 10:20 am 3) Graphics improvements. Using CSS to lay out and style the buttons, do the animation of the blinking-hover-alert-text thing (whatever it's called), and any non-Canvas-mandatory things would free up processing power and let LifeViewer run faster and less laggy and competely eliminate the "menu" row in the EXTENDEDTIMING debug box.
Not using CSS and multiple HTML elements was a deliberate design choice for LifeViewer. The goal being to make it as simple as possible to co-exist in random web pages. As for the performance overhead it's tiny. On my machine the menu handling takes about 0.3ms per frame which is less than 2% of the available time.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

On the topic of prototypes for potential features, a way to customize and change isotropic non-totalistic is something that I'd definitely find interesting, as the ability to change a transition via the push of a button rather than having to go into the rule changing input box (which also resets the pattern) would save a lot of time. I recall Life32 having a menu for this; Cobalt also has a menu to the side that allows for the rule to be changed simply by clicking buttons relating to the transition.

This should make understanding non-totalistic rules far better for newcomers. In addition, if knight and cross neighbourhood isotropic non-totalistic rules ever get native support, the transitions there could be made configurable in much the same way which could also be helpful for established members who will probably be unfamiliar with the notation.

It may even be possible to support non-isotropic transition customization through such a menu, which would be a massive help given how notoriously difficult said rules are to customize. Relevant Golly scripts are MAPper and map_rotate, whose functionalities could be implemented in such an editor.

A similar such menu could be implemented for Margolus rules, allowing for the user to easily define which block goes to which other block.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

rowett wrote: November 28th, 2022, 5:10 pm
muzik wrote: November 28th, 2022, 1:17 pm I've also wondered if it'd be possible to implement certain values and statistics as accessible via # substitution.
Yes. Please suggest some items and their #letter.
I've been thinking about this for a while but can't come up with any good single-letter substitutions. B (for births) and D (either deaths or density) are already taken. Would it be possible to allow for multiple letters after a hash to represent something, or do they strictly have to be single characters? Would non-ASCII characters be acceptable?
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

muzik wrote: December 24th, 2022, 10:52 am This either doesn't generate a period map at all or generates a tiny one:

Code: Select all

x = 782, y = 688, rule = B2n3-k4ej5ey6-e78/S2n3-jk4-cjnwy5cky678
627b3o$626bobobo$626b4obo$627b5o$626bob3o$626bob3o$627b3o2$627b4obo$
630bo2$629b3o$631bo$630bo49$627b3o$626bobobo$626b4obo$627b5o$626bob3o$
627b4o$630bo$627b2o$258bo367bobo$107bo120b4ob3o22b2o26bo123bo214bob3o$
3bo61bo39bobo19bo30bo4b2o24bo30bo4b2o3b4o17bo3b5o22bo3bo2bo23bo2bo2bo
24bo8b2o20bo30bo30bo3bo26bo30bo30bo3bo26bo30bo30bob5o$2b8o54b7o36bo18b
6o25b8o23b5o26b7o2b7o15b4o2b4o21b8obo3bob4o12b8o23b12o19b6o25b6o25b4ob
o3bo21b5o3bo22b7o24b4ob3o23b6o25b6o25b8o$b6obo3bobo48b6ob3obo2b2o2bo
43b5o26b8o23b6o25b7ob3obob4obo11b13o18b10o2bo3bobo12b9o22b6ob5o19b10o
3bobo15b6o25b6obo2b2o19b8o23b7o24b9o22b5o26b11o20b8o$9o3bobo47b9obo3b
7o41b7o2bo21b11o20b10o21b9o4bob4obo10b9o3b2o17b6ob5o4b3obo10b9o22b10ob
3o17b10o3bobo15b10o21b8o23b9obo20b9o22b6o25b6o25b11o20b6o2bo$b8obo52b
11ob2ob4o43b5o2bo23b6obo23b5o2b2o22b6ob3o4bobo14b6o3b2obo18b5o4b2o2bob
3o13b7o24b8o23b6o4b2o2b2o15b11o20b5ob2obo21b5o2b2o22b5obo24b10o21b4obo
25b6o2b2o21b6o$2bo2b4o55bo4b2o4b6o45bo30bo4b2o24bo30bo13bo16bo30bo4bob
2o6b3o13bo5b2o23bo6bo23bo3bo4b5o17bo4bobo23bo3bo26bo3b2o2bo22bo30bo30b
o2bo27bo30bo$6bo63bo7b4o145bo68bobo18bo60bo4b2obo146b3o90bo$78bo218bo
7$122b2o$120bob2o$118bo2bo2bo$119b4o$120bob2o$120b3o$119bob4o$120b4o
503b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo501bob
3o$121b3o502bob2obo$627b3o$628b4o$627bob5o$627bob4o$628bo3bo$631bo2$
631bo14$122bo$121bobob2o$120b5o$119b6o$120b5o502b3o$120b4o502bobobo$
119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o503b4o$626b5obo$
627b4o$627b3o$627bo$630bo$630b3o$628bob2o$629b4o$630b3o5$119bo$121bo$
118b2o$119b3o$120b2o$120b3o2$120b2o$120b2o$119b5o$120b2o$119bob3o$119b
ob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo
501bob3o$121b3o502bob2obo$626bob2obo$626bob3o$626bob4o$627b5o$628b4o$
629b3o$629b3o$629bo5$626b2o$122b2o503b2o$118bo4b2o503bo$119bo3b2o$118b
o3b2o3$119b2o$118b3o$118b2o$119bobob2o$122b4o$121b5o$120b4o503b3o$120b
3obo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o
503b4o$626b6o$627bo$628bo$626b2o10$120bo$119bo6$124bo$122bobo$121b2o$
121bo$119b6o$119bob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$119bob
4o502b5o$120bobobo502b4o$121b3o503bobobo$629b2o$628bo$628bobo$627b3o2$
631bo$627bob2obo$628bob4o$627b2obo12$121bo2b2o$120b6o$119bob4o$119b6o$
120b4o$119bob3o503b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b5o$
120bobobo502b4o$121b3o502b4obo$626b5o$626b5o$625b7o$625bob7o$626bobob
2o$629b3o16$122b2o$123bo$123bo$121b3o$122b2o503b3o$120b3obo501bobobo$
119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o502bob2obo$626bo
b2obo$626b4obo$628b3o$626bo2bo$629bo$628b3o$630b2o$630bo$627b2o$627bob
o$626bobo6$119bo$118b2o$121bo$118b2o3bo$123bo$122b2o$121b3o$120b4o$
119bob3o$119bob3o503b3o$120b3obo501bobobo$119b5o502b4obo$119bob4o502b
5o$120bobobo502b4o$121b3o504b2o$626b3o$627b4o$627b2o$630b2o$629b3o$
629bobo$628b3o$629bo10$121bo$120b3o$119bobo$119b3o$119b2o$122b2o$120b
4o$122b3o$121b2o504b3o$120b4o502bobobo$119b5o502b4obo$119bob4o502b5o$
120bobobo501bob3o$121b3o503b3obo$627b3obo$627b4o$627b3o$627b2o$627bo$
627bo3b2o$629bo$631b2o$631bo6$122bobo$121bobo$122b2o$120bo$119b2o$120b
3o$121bo$121bo2bo$120b3o$119bob4o$119bob2obo$119bob2obo502b3o$120b3obo
501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o503b2o
$627b3o$627bo$627bo$627b2o16$119b3o$119b2obobo$117b7obo$119b7o$120b5o$
120b5o$119bob4o502b3o$120b4o502bobobo$119b5o502b4obo$119bob4o502b5o$
120bobobo501bob3o$121b3o503b3obo$627b4o$626b6o$626b4obo$625b6o$625b2o
2bo12$120bob2o$117b4obo$118bob2obo$119bo2$121b3o$120bobo$122bo$120b2o$
119bobobo503b3o$120b4o502bobobo$119b5o502b4obo$119bob4o502b5o$120bobob
o501bob3o$121b3o502bob2obo$626b6o$629bo$628b2o$626bobo$626bo6$631bo$
630bo10$123b2o$122bo$123bo$119b6o$120b4o503b3o$120b3obo501bobobo$119b
5o502b4obo$119bob4o502b5o$120bobobo501bob3o$121b3o503b4o$625b5o$625b4o
$626b2obobo$631b2o$630b3o$630b2o3$627b2o3bo$626b2o3bo$122bo503b2o4bo$
122b2o503b2o$123b2o5$121bo$119b3o$119b3o$119b4o$119b5o$119b4obo$120b3o
bo$119bob2obo$119bob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$119bob
4o502b5o$120bobobo501bob3o$121b3o502bob2obo$627b3obo$629b2o$627b5o$
629b2o$629b2o2$628b3o$629b2o$629b3o$631b2o$629bo$631bo5$118b3o$118b4o$
119b2obo$118b3o$120bo$123bo$121b3o$120b4o$118bob5o$120b4o503b3o$120b3o
bo501bobobo$119b5o502b4obo$119bob4o502b5o$120bobobo502b4o$121b3o502b5o
$626b6o$626b5o$624b2obobo$628bo14$119bo2$119bo$118bo3bo$118b4obo$117b
5obo$119b4o$121b3o$119bob2obo502b3o$120b3obo501bobobo$119b5o502b4obo$
119bob4o502b5o$120bobobo501bob3o$121b3o503b4o$626b4obo$628b3o$627b2obo
$628b4o$626bo2bo2bo$627b2obo$627b2o7$453bo253bobo$124bo90b3o146bob2o4b
o60bo18bobo68bo183bobo$128bo30bo27bo2bo30bo30bo22bo2b2o3bo26bo3bo23bob
o4bo17b5o4bo3bo23bo6bo23b2o5bo13b3o6b2obo4bo30bo16bo13bo30bo24b2o4bo
30bo25bo4bo47bo3bob4o4bo61bo$124b6o21b2o2b6o25bob4o21b10o24bob5o22b2o
2b5o21bob2ob5o20b11o15b2o2b2o4b6o23b8o24b7o13b3obo2b2o4b5o18bob2o3b6o
14bobo4b3ob6o22b2o2b5o23bob6o23bo2b5o22b2ob6o44b5o3b3ob6o57bob3o$122bo
2b6o20b11o25b6o25b6o22b9o20bob9o23b8o21b10o15bobo3b10o17b3ob10o22b9o
10bob3o4b5ob6o17b2o3b9o10bob4obo4b9o21b10o20b11o21bo2b7o18bobob9o43b4o
2b3o3b7o52b2o3b2ob2o$122b8o20b11o26b5o22b9o24b7o23b8o19b2o2bob6o25b6o
15bobo3b10o19b5ob6o22b9o12bobo3bo2b10o18b13o11bob4obob3ob7o25b6o23b8o
26b5o18bobob9o46b5o2b9o56bo3bo$121b8o25b6o25b6o23b3ob4o24b7o22bo3b5o
21bo3bob4o25b6o25b6o19b12o23b8o12b4obo3bob8o21b4o2b4o15b7o2b7o26b5o23b
8o25b6o22b9o46bob2ob11o$121b5obo30bo30bo26bo3bo30bo30bo26bo3bo30bo30bo
20b2o8bo24bo2bo2bo23bo2bo3bo22b5o3bo17b4o3b2o4bo30bo24b2o4bo30bo21b2o
3b2o2bo48b3obo2b2o4bo$121b3obo214bo123bo26b2o22b3ob4o124b4o$122bobo
367bo$122b2o$120bo$120b4o$120b3obo$119b5o$119bob4o$120bobobo$121b3o8$
123bo$123bo$121b5o$123bo$123bo7$117b2obobo$121b4o$119b5obo$118bob5o$
118b6o$120b4o$121b3o$120b3obo$120b3obo$119b5o$119bob4o$120bobobo$121b
3o50$116b4o$116b3o$116bob2ob2o$118bo2bo$121bobo$122bobo$120b4o$119bob
3o$120b3obo$119b5o$119bob4o$120bobobo$121b3o!
LifeViewer can now display period maps with less than 1 pixel per cell.
muzik wrote: December 24th, 2022, 10:52 am This also takes a while (30 seconds plus on my end) to fully identify after it recognises periodicity, and also produces the same kind of map:

Code: Select all

x = 6, y = 47, rule = B2in3-kq4cjy5eky6-e78/S3-jk4-cjnw5ce678
3b2o$2b2o$b4o$b4o$5o$b5o$2b3o$3bo25$2bo$2bo6$bobo$b4o$b4o$b4o$5o$b5o$
2b3o$3bo!
I improved the performance of the Strict Volatility calculation. On my machine Identify calculation on this pattern reduced from 46 seconds to 12 seconds.
muzik wrote: December 24th, 2022, 10:52 am Also, could some method be implemented to access prior Identify results if they are closed, without having to simulate the pattern a second time (for larger or high-period patterns, this can take a lot of time)? While the output values and such are still accessible in the help section, there's no way to get back to the period map at all.
This is now available on hotkey Shift-F6. At some stage I'll add UI controls to do the same.
GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Pattern viewer for forum threads

Post by GUYTU6J »

Trying out the freshly integrated rotor period map on an anisotropic rule from this post, and the largest number of colors I can get in the palette is 20:

Code: Select all

x = 44, y = 1, rule = MAPAAD//zAwPz8AAP//MDA/PwAA//8AAP//AAD//wAA//8AAD8/AAD//wAAPz8AAP//wMD//wAA///AwP//AAD//w
44o!
It seems that the contrast between some colours may be improved. For example, it is very difficult to tell apart 6561 from 13122.
oscillizer.png
oscillizer.png (14.31 KiB) Viewed 1386 times
Why is there no presence of "darker" color where one of the RGB values is below 66 (in hexadecimal) or 102 (in decimal)?
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

On the topic of that rule, Identify does not seem to work well with the ruletable version:

Code: Select all

x = 5, y = 1, rule = coverleafsim
5o!
@RULE coverleafsim
@TABLE
n_states:2
neighborhood:moore
symmetries:none
var a={0,1}
var b=a
var c=a
0,0,a,b,c,1,0,1,0,1
1,0,a,b,c,0,0,0,1,0
0,1,a,b,c,0,0,0,1,1
1,0,a,b,c,0,0,1,0,0

Code: Select all

x = 5, y = 1, rule = MAPAAD//zAwPz8AAP//MDA/PwAA//8AAP//AAD//wAA//8AAD8/AAD//wAAPz8AAP//wMD//wAA///AwP//AAD//w
5o!
The map string works fine, but the ruletable just outright crashes the viewer for some reason despite this being an easily identifiable period-18 oscillator. I've tried identifying longer strings in both the ruletable and map string version of this rule and the map version works perfectly, but the ruletable identification just keeps on running far beyond whatever the period of the object is, completely failing to identify anything at all even when it should have ages ago.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

rowett wrote: December 24th, 2022, 2:48 pm
muzik wrote: December 24th, 2022, 10:52 am I'd also find it useful if there existed some way to zoom into maps, since they can contain intricacies which may warrant further examination
Haven't decided on this yet.
One approach I thought of that I'm fond of would be to somehow render the map as an overlay across existing cells, such that each cell in the period map is always over the exact same cell in the pattern, rather than just having it be its own box. This would allow for scrolling and zooming into the map to any desired extent just like any normal pattern using LifeViewer's standard controls. There could also be an opacity slider that would allow for the transparency of the map to be changed, such that the actual pattern can be made partially visible behind it, much like the opacity slider the graph has.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

GUYTU6J wrote: December 26th, 2022, 9:36 am It seems that the contrast between some colours may be improved. For example, it is very difficult to tell apart 6561 from 13122.
I've improved the contrast in build 809. Let me know what you think.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

muzik wrote: December 26th, 2022, 11:58 am Identify does not seem to work well with the ruletable version
Fixed, thanks.
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

Could the grid displayed on period maps be made toggleable? I find that it looks weird and distracting with some larger patterns, possibly due to interpolation:
Image

Grid lines also appear to be absent at the extreme top and left.

Also I'm not too sure about the new colors used for distinguishing periods in build 809. Perhaps I'm too used to the colors from prior builds (or the grid is messing with my perception). Would it be possible to add some way to switch between sets of predefined colors; one setting for the current high-contrast palette, and a second option for the pre-809 colors? (and maybe a third that mimics Oscillizer's original set that eventually just makes everything below a certain period orange, for good old times' sake - we do have MCell and Life32 themes, after all)

It also seems like period maps for big patterns that are beyond one cell per pixel have decided to vanish once more...
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
wirehead
Posts: 304
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Pattern viewer for forum threads

Post by wirehead »

rowett wrote: December 25th, 2022, 7:34 am Not using CSS and multiple HTML elements was a deliberate design choice for LifeViewer. The goal being to make it as simple as possible to co-exist in random web pages. As for the performance overhead it's tiny. On my machine the menu handling takes about 0.3ms per frame which is less than 2% of the available time.
What "random web pages" are you trying to support? Internet Explorer?? Surely any modern user doing serious examination of these forums will also have a modern browser that can handle much more than <canvas>es.

And what happens when you want to add new graphics tweaks? Say, like a rounded corner on your buttons if that would ever be desirable? You would have to add a whole new block of code to the button drawing routine, whereas in CSS all you would need is border-radius: 3;. Please, don't reinvent the wheel.

I have a small demo of a few key features of LifeViewer's UI implemented in CSS now up at https://dragoncoder047.github.io/ca-exp ... s/css.html. Have a look, say what you like. And feel free to ask me to try to implement any other aspect of LifeViewer in CSS (except for the drawing of the actual cells on the canvas, of course!), and I'll see if I can duplicate it.

As to the COLOR command that lets people mangle the colors of the UI, you only need to use CSS variables (any modern browser that can handle LifeViewer's existing code can also handle CSS variables). I didn't bother with those in my demo, but wherever a color is supplied, you can use a CSS variable (for example: background-color: var(--background-color);) and then do lvElement.style.setProperty("--background-color", some_value); when the COLOR command is executed.

I hope this helps. If it doesn't, let me know and I'll shut up.
Langton's ant: Can't play the drums, can be taught.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

muzik wrote: December 26th, 2022, 2:38 pm Could the grid displayed on period maps be made toggleable?
It's now automatically selected based on cell size.
muzik wrote: December 26th, 2022, 2:38 pm Also I'm not too sure about the new colors used for distinguishing periods in build 809. Perhaps I'm too used to the colors from prior builds (or the grid is messing with my perception).
I prefer them (especially now the grid is improved).
muzik wrote: December 26th, 2022, 2:38 pm It also seems like period maps for big patterns that are beyond one cell per pixel have decided to vanish once more...
I couldn't reproduce this. Please let me know if you still see this and post an example.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

wirehead wrote: December 26th, 2022, 10:14 pm What "random web pages" are you trying to support? Internet Explorer??
Web page, not web browser. Design goal was for simple integration: one Javascript file to include with no dependencies, one HTML element per viewer (rather than many).

I'm a fan of CSS but it didn't meet the requirements for this project. I do like your CSS examples (especially the slider).
User avatar
muzik
Posts: 6604
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Pattern viewer for forum threads

Post by muzik »

rowett wrote: December 26th, 2022, 11:35 pm I couldn't reproduce this. Please let me know if you still see this and post an example.
First example on this page doesn't show a map in builds 809 or 810; it showed one just fine in 808. I've tried on the forums as well as the full-size embedded viewer, and still nothing.
rowett wrote: December 26th, 2022, 11:35 pm
muzik wrote: December 26th, 2022, 2:38 pm Could the grid displayed on period maps be made toggleable?
It's now automatically selected based on cell size.
Can it be made to view at an integer zoom level where possible (i.e. when the pattern in question is neither too big to display without a non-integer display, nor too small that it would take up the whole screen and push out the legend or be obstructed by buttons if shown at a massive size like in pre-809 builds)? Currently, non-integer zoom levels are used, and interpolation results in unevenly spaced, invisible and abnormally thick grid lines which I find distracting. Using antialiasing to get around this would without a doubt cause blurring, which I think should be avoided in situations like this.
Image

I should also point out that the super high period example from the last page now has a map that renders much smaller than before, for some reason. Here's the old build:
Image

And here it is in the new one:
Image

I'm aware the second pattern is subtlety different, but the pattern seen in the background, envelopes included, clearly fits onto the screen in its entirety at an integer zoom level of 4, so it should be possible to make it larger and more readable while still conforming to the proposed "integer zoom if possible" system described above.
Parity Replicator Collection v1.6 is now live - please send all relevant discoveries here.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

muzik wrote: December 27th, 2022, 12:15 am First example on this page doesn't show a map in builds 809 or 810; it showed one just fine in 808. I've tried on the forums as well as the full-size embedded viewer, and still nothing.
It works for me on 809, 810 and now 811.
muzik wrote: December 27th, 2022, 12:15 am Can it be made to view at an integer zoom level where possible
Yes this was added in 810.
muzik wrote: December 27th, 2022, 12:15 am I should also point out that the super high period example from the last page now has a map that renders much smaller than before, for some reason.
Try 811.
User avatar
wirehead
Posts: 304
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Pattern viewer for forum threads

Post by wirehead »

rowett wrote: December 26th, 2022, 11:54 pm Web page, not web browser. Design goal was for simple integration: one Javascript file to include with no dependencies, one HTML element per viewer (rather than many).

I'm a fan of CSS but it didn't meet the requirements for this project. I do like your CSS examples (especially the slider).
You can still distribute CSS inside of a Javascript file:

Code: Select all

window.addEventListener("DOMContentLoaded", () => {
    var s = document.createElement("style");
    s.textContent = "big CSS string"; // run through a minifier first!!
    document.head.append(s);
});
And you can also create, edit, rearrange, and remove HTML elements just as easily as you can draw on a canvas. No extra files and no backwards-incompatible HTML changes needed. See here.

EDIT: also, I fixed some visual glitches on the slider so the text is now in front of the slider and the knob always lines up with the gray part.
Langton's ant: Can't play the drums, can be taught.
User avatar
rowett
Moderator
Posts: 4587
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Pattern viewer for forum threads

Post by rowett »

wirehead wrote: December 27th, 2022, 9:25 am You can still distribute CSS inside of a Javascript file:

And you can also create, edit, rearrange, and remove HTML elements just as easily as you can draw on a canvas. No extra files and no backwards-incompatible HTML changes needed. See here.
I know how it works. It doesn't fit my requirements for LifeViewer which is why I use a pure Javascript UI library.
User avatar
wirehead
Posts: 304
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: Pattern viewer for forum threads

Post by wirehead »

rowett wrote: December 27th, 2022, 2:41 pm
wirehead wrote: December 27th, 2022, 9:25 am You can still distribute CSS inside of a Javascript file:

And you can also create, edit, rearrange, and remove HTML elements just as easily as you can draw on a canvas. No extra files and no backwards-incompatible HTML changes needed. See here.
I know how it works. It doesn't fit my requirements for LifeViewer which is why I use a pure Javascript UI library.
I am not telling you to get rid of code that you have worked for so many years on. In fact, half of it is still probably necessary for what's being drawn on the canvas (labels, selections, etc) and can't be gotten rid of. I just think taking advantage of existing codebases (i.e. the browser's rendering engine) that have been thouroughly debugged a whole lot more than LifeViewer has and have been around for many times longer would be much more reliable and eliminate concerns about graphics issues with the buttons, menus, and sliders. Which have happened. Take it from a programmer who spent a month trying to implement a Tcl interpreter in Python, encountering a myriad of parsing errors, recursion issues, and many missing commands, only to learn later that Python comes with a full-featured and battle-tested Tcl interpreter already included in the standard library (the tkinter module), whereupon I spent the next hour banging my head against the wall.

Also, suppose people want to customize the look and feel of LifeViewer to match the look and feel of the site it's embedded in. Right now, they either have to muck around with adding COLOR comands to all of their source pattern boxes, or muck around trying to reverse-engineer LifeViewer to hack your homebrew rendering engine. LifeViewer is supposed to be a plugin, isn't it? But right now it feels like just another app that is garishly embedded in the middle of another page that looks nothing like the blocky styles used by LifeViewer currently. Using a little CSS for some of the elements would allow the user to override some of the styles and allow LifeViewer to more tightly integrate into the aesthetics of whatever it's embedded into.

LifeViewer is, currently, an opaque mass of minified Javascript that obviously does something, but only Chris Rowett is sure of exactly what. The user of the UI can navigate easily (as was intended) but to developers it is a complete black box. All I can do is poke it wil a stick and see what happens.

At the very least, I'm willing to help with documentation. 95,000 lines is five times more that I've written in my entire life, but seeing as that you're probably only three to four times older than me, I'm not that far behind. I would just read the code, and write up the docs. You'd still be writing the code (hopefully slower than I'd be writing the documentation), and would still have full power to reject any ideas I propose.

Another thing: it has helped me a lot, in larger projects, tho break down the entire thing into smaller "systems" -- for LifeViewer, those would be the rule function system, the world (cells) system, the user interface system, etc. And then model each of those as a black box machine that produces, say, buttons on the screen, given a set of anchors (top left, middle, in a grid, etc), sizes, colors, text, etc. and produces click events on the buttons. (Heeey... that sounds a lot like HTML...) Each system can be swapped out for an equivalent system that takes the same inputs and produces the same outputs (like swapping QuickLife for HashLife), and as far as the rest of the application is concerned there was no change (the other systems do not care about the implementation of another). And, ideally, you could have an option to retain the old implementation of a particular system and give the user an option to rollback to the old one (or do it automatically) if the new one experiences problems.
rowett wrote: December 24th, 2022, 3:13 am The best approach to get something added to LifeViewer is post the idea here and if it looks useful there is a reasonable chance I'll add it at some stage.
Sorry I didn't post this one sooner -- @ICON support. Seems pretty simple to me: when the rule is loaded, and and ICONS section is found, each icon can be drawn to an OffscreenCanvas and ImageData snips of that canvas can be captured for each state's icon and cached along with the rule. Then they can be simply copied to the main canvas instead of drawing a solid square of color.
Langton's ant: Can't play the drums, can be taught.
Post Reply