3D zoomable Conway's viewer

For scripts to aid with computation or simulation in cellular automata.
Post Reply
westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

3D zoomable Conway's viewer

Post by westoncb » February 14th, 2017, 5:44 pm

Hey guys—I just finished a project to do a version of Conway's Game of Life with 'good graphics.' You can use it here: http://symbolflux.com/conwayz/ (or there's a video here: https://www.youtube.com/watch?v=oCTmNURs8xk)

It was mostly meant to be an amusement, but it occurs to me that it may not be far off from actually being useful: the zooming/panning makes it convenient to switch between high-level and detailed views, the 'editing mode' makes it easy to perform simple experiments, and I personally find it easier to focus on and learn the details of local interactions when they're rendered more richly—which I didn't really expect.

Anyway, I thought you guys might get a bit of a laugh out of it if nothing else. If there were some interest in folks using it, it's possible I'd add a few small features. The source is also pretty small, well-documented, and available on github.

Gamedziner
Posts: 795
Joined: May 30th, 2016, 8:47 pm
Location: Milky Way Galaxy: Planet Earth

Re: 3D zoomable Conway's viewer

Post by Gamedziner » February 15th, 2017, 8:01 am

Welcome to the Conway's Game of Life forums, westoncb!

There's an interesting pattern I personally would suggest you add to the sample patterns. It's called the Copperhead.

Code: Select all

x = 81, y = 96, rule = LifeHistory
58.2A$58.2A3$59.2A17.2A$59.2A17.2A3$79.2A$79.2A2$57.A$56.A$56.3A4$27.
A$27.A.A$27.2A21$3.2A$3.2A2.2A$7.2A18$7.2A$7.2A2.2A$11.2A11$2A$2A2.2A
$4.2A18$4.2A$4.2A2.2A$8.2A!

westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

Re: 3D zoomable Conway's viewer

Post by westoncb » February 15th, 2017, 2:18 pm

Thanks Gamedziner—that's pretty nice, hadn't heard of it.

It would be neat to use it for part of a feature I haven't gotten to yet: being able to 'stamp' these small scale patterns that are useful in multiple constructions, rather than only being able to add/remove single tiles (as at present). In other words it would be part of a palette of small spaceships and other forms which users could click to place on the grid.

I think you may have accidentally pasted a different pattern though—I get this when viewing it: Image

Edit: used the img tag

User avatar
BlinkerSpawn
Posts: 1992
Joined: November 8th, 2014, 8:48 pm
Location: Getting a snacker from R-Bee's

Re: 3D zoomable Conway's viewer

Post by BlinkerSpawn » February 15th, 2017, 3:44 pm

That pattern isn't the copperhead, that's just a ruler-object encoded into his signature.
You can grab the copperhead RLE from the wiki page he linked to by scrolling down to where it says "Pattern files", clicking show, and clicking on "copperhead.rle".
LifeWiki: Like Wikipedia but with more spaceships. [citation needed]

Image

westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

Re: 3D zoomable Conway's viewer

Post by westoncb » February 15th, 2017, 3:57 pm

Ahh—oops! Thanks.

User avatar
Alexey_Nigin
Posts: 326
Joined: August 4th, 2014, 12:33 pm
Location: Ann Arbor, MI
Contact:

Re: 3D zoomable Conway's viewer

Post by Alexey_Nigin » February 15th, 2017, 5:20 pm

The "P3 agar" in your collection isn't an agar; in fact, it dies after a few generations. While I am at it, you can do much better than showing small pieces of agars. Since your program simulates Life on a torus, it seems feasible to make agars fill the entire universe.
There are 10 types of people in the world: those who understand binary and those who don't.

User avatar
Kiran
Posts: 285
Joined: March 4th, 2015, 6:48 pm

Re: 3D zoomable Conway's viewer

Post by Kiran » February 15th, 2017, 5:27 pm

Why does the screen go blank each time I move the mouse over it?
Kiran Linsuain

westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

Re: 3D zoomable Conway's viewer

Post by westoncb » February 15th, 2017, 6:25 pm

Hey Alexey—thanks for pointing that out. I actually wasn't sure what an agar was and actually assumed it just meant some kind of quickly decaying pattern. I looked it up on the wiki just now though and it seems like the real thing would be much more interesting :)

Unfortunately while the program does visually simulate life on a torus, the rules are applied on a bounded grid: anything off the grid is just considered an empty cell. Actually though, it would be pretty simple to make the rules wrap around as well though, I think—should just be cell indices modulo the grid size... Maybe I'll play with that.

It is still puzzling to me why the Agar isn't repeating (in time) though... My first assumption was that the pattern was larger than my grid size (256x256), but it's only 167x161. Maybe I have some bug in parsing the dbLife files.

westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

Re: 3D zoomable Conway's viewer

Post by westoncb » February 15th, 2017, 6:26 pm

Thanks for letting me know Kiran—sounds like a bug!

Mind if I ask which browser you're using? And it renders and animates correctly as long as your mouse isn't moving?

User avatar
gameoflifeboy
Posts: 474
Joined: January 15th, 2015, 2:08 am

Re: 3D zoomable Conway's viewer

Post by gameoflifeboy » February 15th, 2017, 7:10 pm

The agar doesn't work in Life because it is from a pattern collection for the rule Seeds (B2/S). It came from a site with patterns that worked in rules other than Life.

Also, two of the eaters in the "Eaters" collection don't work. One of them is placed too close to a glider and the other has two extra cells next to it. Similar problems happened with the oscillator collections.

Finally, I noticed a bug on Chrome where, when editing patterns, the cells get put about 25% closer to the upper-left corner of the screen than my cursor is.

westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

Re: 3D zoomable Conway's viewer

Post by westoncb » February 15th, 2017, 10:57 pm

Hey thanks for pointing out the Eaters issue—that helped me finally tracked down the bug that was causing errors there and with the oscillators (and probably elsewhere too). I hadn't realized before that a number before a '$' symbol indicated blank rows! The fix is up.

I see what you mean about the agar using a different rule set, but I've been experimenting with others and my understanding now is they only work if the pattern is unbounded (i.e. infinite or wrapping grid), so maybe I'll add the feature later—but for now I think I'll just leave out agars.

Edit: yep! it fixed 'GliderGunSyntheses' also, which I always thought was cool and wished worked correctly.
Last edited by westoncb on February 15th, 2017, 11:00 pm, edited 1 time in total.

User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: 3D zoomable Conway's viewer

Post by Saka » February 15th, 2017, 10:59 pm

The "Gliders" don't work. Are they supposed to be in a different rule?

westoncb
Posts: 7
Joined: February 14th, 2017, 5:32 pm

Re: 3D zoomable Conway's viewer

Post by westoncb » February 15th, 2017, 11:05 pm

I think I just fixed Gliders—should work if you refresh.

The rule is '755:S S23/B34' —is the 755:S for speed or something?

User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: 3D zoomable Conway's viewer

Post by Saka » February 15th, 2017, 11:28 pm

westoncb wrote:I think I just fixed Gliders—should work if you refresh.

The rule is '755:S S23/B34' —is the 755:S for speed or something?
It still does not work

The 755:S is nothing I have ever heard of. Maybe MCell stuffs

User avatar
rowett
Moderator
Posts: 3814
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: 3D zoomable Conway's viewer

Post by rowett » February 16th, 2017, 1:05 am

Just wanted to say - really nice job :)

User avatar
dvgrn
Moderator
Posts: 10669
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: 3D zoomable Conway's viewer

Post by dvgrn » February 16th, 2017, 1:06 am

Saka wrote:The 755:S is nothing I have ever heard of. Maybe MCell stuffs
More likely Life32. There was a bug in Life32v2.16 where the Life rule would get saved as "S S23/B3", and Life32 still knew what that meant but no other Life editor did.

Notice the Reactions.lif pattern has just plain "rule = 755:S23/B34", no extra "S"... and the "x = -1, y = -1" was a Life32 bug as well, so these patterns were definitely saved from Life32v2.16.

That said, they clearly don't work in plain B34/S34, so the 755 definitely means something -- apparently something that only Life32 and WinLife32 knew about. The download page notes that most of the collections run in Golly, Life32, or WinLife32, but this particular collection must leave Golly off the list deliberately.

Life32 is at least partially back in business after a long hiatus -- anyone care to fire it up and see what 755: might mean?

User avatar
rowett
Moderator
Posts: 3814
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: 3D zoomable Conway's viewer

Post by rowett » February 16th, 2017, 1:48 am

dvgrn wrote:Life32 is at least partially back in business after a long hiatus -- anyone care to fire it up and see what 755: might mean?
The Life32 help says:

The text notation is based on the Xlife standard with some additions:
  • First a character showing the neighborhood (see below); choices are: M: Moore (default), V: Von Neumann, H: for HexLife or an octal notation (e.g. "757"). Then a colon ":" to separate the neighborhood and rule part.
  • Than the rule part. This is survival counts listed as a string of digits, a slash, and birth counts as a string of digits. If you can't remember whether it's survival/birth or birth/survival, you can add a "b" for "birth" or an "s" for survival on either side of the slash to make it clear. For example, the following are all equivalent: 23/3, 23/3b, 3/23s, s32/3, 3/s32, b3/23, B3/S32.
  • Alan Hensel's non-totalistic extensions. These are entered by typing letters after the number you want them to apply to. The extensions are explained below.
So 755: is a custom neighborhood.

User avatar
Kiran
Posts: 285
Joined: March 4th, 2015, 6:48 pm

Re: 3D zoomable Conway's viewer

Post by Kiran » February 18th, 2017, 9:07 am

I am using Mozilla Firefox, and the whole display goes blank every time I move the mouse over the image, moving it outside the image does not cause problems.
Kiran Linsuain

Post Reply