Life tag testing

For scripts to aid with computation or simulation in cellular automata.
Locked
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Excellent - many thanks!
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Dave I converted your G4G13 talk into a single file multiverse. You can use Page Down to go to the next animation.
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

Hmm, looks like we have a problem with label range validation again. Minstrel and Turner are throwing errors with Build 301, where they were fine in the previous build. Looks like LifeViewer is complaining about negative X and/or Y coordinate values now, but of course those are needed when the label is supposed to go outside the pattern bounds.

I might do a temporary patch to those LifeWiki articles until another build can be rolled out, then revert the pages back to the current commands.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:Hmm, looks like we have a problem with label range validation again. Minstrel and Turner are throwing errors with Build 301, where they were fine in the previous build. Looks like LifeViewer is complaining about negative X and/or Y coordinate values now, but of course those are needed when the label is supposed to go outside the pattern bounds.
What should the valid range be?
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:What should the valid range be?
Depends on the size of the pattern, I guess. You want to be able to label objects around the edges, possibly with a fair amount of text eventually, something multiline like

Code: Select all

name
discoverer
discoveryear
description 1
description 2
description 3
(Heh, I was just thinking recently of asking about adding annotation arrows. That could push the reasonable location of labels even farther away...!)

Even if you pan so that nothing but the label is showing, that might still be okay in some cases -- might want a waypoint animation script that starts or ends at a label outside the pattern. And what if a glider or spaceship is eventually going to be somewhere far outside the current pattern bounds, and we'll want a label on that escaping glider at T=10000 or something?

Maybe validation isn't really helpful for label numbers, except for forbidding coordinates that LifeViewer actually can't handle.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 302 is now available on the lazyslug server

Enhancements in this build:
  • fps display < 10 now shows one decimal place
Fixes in this build:
  • label positions can now be from -MAXGRIDSIZE to 2*MAXGRIDSIZE
  • clear notifications on pattern load
  • Waypoint animation was incorrect at STEP > 1
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

The valid label range is now -MAXGRIDSIZE to MAXGRIDSIZE*2. That should give plenty of room for off-grid labels since the on-grid coordinates are from 0,0 to MAXGRIDSIZE-1,MAXGRIDSIZE-1.
dvgrn wrote:(Heh, I was just thinking recently of asking about adding annotation arrows. That could push the reasonable location of labels even farther away...!)
What's the specific requirement?
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:
dvgrn wrote:(Heh, I was just thinking recently of asking about adding annotation arrows. That could push the reasonable location of labels even farther away...!)
What's the specific requirement?
How about

COLOR ARROW {named color | RGB value }
ARROWALPHA {alpha}
ARROWSIZE {line width / ratio of line length to arrowhead length, default 10}
ARROWT {generation range / fade}
ARROW X1 Y1 X2 Y2 ZOOM (FIXED)

?

I'm thinking a standard three-line-segment arrow is plenty good enough:
Arrow.PNG
Arrow.PNG (741 Bytes) Viewed 936 times
Microsoft tends to make this complicated by offering double-ended arrows, arrows with solid heads, dotted- and dashed-line arrows, etc. Double-ended arrows would just be a second command ARROW X2 Y2 X1 Y1, and the other options don't seem to be entirely necessary.
User avatar
Andrew
Moderator
Posts: 1073
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Life tag testing

Post by Andrew »

rowett wrote:You can use Page Down to go to the next animation.
Neither of my Macs have Page Up/Down keys. Is there any non-keyboard way to switch?

PS. I must admit I'm a bit puzzled why you guys are doing all this stuff in Lifeviewer when a Lua script + overlay would seem to provide all the necessary capabilities (including arrows, annotations, etc etc). See for example the credits.lua script that Chris wrote. What am I missing?
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife, HatLife, SpectreLife
User avatar
Nathaniel
Site Admin
Posts: 907
Joined: December 10th, 2008, 3:48 pm
Location: New Brunswick, Canada
Contact:

Re: Life tag testing

Post by Nathaniel »

Long-overdue update: You can now update lv-plugin.js on the ConwayLife.com server via the moderator control panel!

http://www.conwaylife.com/mod_lv_update.php

On a related note, Build 302 is now live (via that page).
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

Andrew wrote:PS. I must admit I'm a bit puzzled why you guys are doing all this stuff in Lifeviewer when a Lua script + overlay would seem to provide all the necessary capabilities (including arrows, annotations, etc etc). See for example the credits.lua script that Chris wrote. What am I missing?
I don't think you're missing too much, necessarily. It's just that you can't embed Golly in a forum posting, or on a LifeWiki page. And when Siobhan Roberts writes a Life Quinquagenary retrospective article for the New York Times, and the NYT folks want an interactive feature for their Web page to go along with the article, a lot of readers who aren't going to download Golly will still see an animation in the sidebar if it's LifeViewer-based.

... And when I had to put together a 50th-anniversary timeline pattern for Will Cavendish's Conway documentary and needed to be able to do a flyover animation, the waypoint scripting functionality was already there and working in LifeViewer, but not in lifeviewer.lua.

Also Chris seems to have been avoiding like the plague the task of porting the rest of LifeViewer to lifeviewer.lua. I have a sneaking suspicion that that might be because it's not particularly easy to duplicate all of what LifeViewer can do. And I'm unfortunately short on time these days, so I'll definitely take the quicker solution where I can!

I definitely do hope that lifeviewer.lua will someday have all of this functionality, so that patterns can move effortlessly back and forth between forum postings, LifeWiki, and Golly. But it's probably better if I don't hold my breath, and also if I don't make any big promises about taking over that porting job myself. I still have a couple of years' worth of other backlogged Life tasks to get through before I take on too many new projects...!
User avatar
Andrew
Moderator
Posts: 1073
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Life tag testing

Post by Andrew »

dvgrn wrote:It's just that you can't embed Golly in a forum posting, or on a LifeWiki page.
Yep, good point! Having a sophisticated web-based viewer/editor that is also scriptable is hugely convenient.
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife, HatLife, SpectreLife
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Nathaniel wrote:Long-overdue update: You can now update lv-plugin.js on the ConwayLife.com server via the moderator control panel!

http://www.conwaylife.com/mod_lv_update.php
Excellent! Please may I have a login for that page?
Nathaniel wrote:On a related note, Build 302 is now live (via that page).
Many thanks!
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Andrew wrote:
rowett wrote:You can use Page Down to go to the next animation.
Neither of my Macs have Page Up/Down keys. Is there any non-keyboard way to switch?
Not yet but it's planned. However you make an excellent point - not all keyboards have Page Up/Down. I'll add Ctrl-Arrow keys as an alternative.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 303 is now available on the lazyslug server

Enhancements in this build:
  • new annotation arrows - test:
    • new script command [[ ARROW X1 Y1 X2 Y2 ZOOM (FIXED) ]]
      • draw arrow from X1,Y1 to X2,Y2 at zoom ZOOM
    • new script command [[ ARROWALPHA <0.0..1.0> ]]
      • set alpha value for subsequent arrow definitions
    • new script command [[ ARROWSIZE <1..> <1.0..100.0> ]]
      • set line width and head size percentage for subsequent arrow definitions
    • new script command [[ ARROWT <t1> <t2> <fade> ]]
      • sets a range of generations from <t1> to <t2> for subsequent arrows to be visible
      • <fade> specifies generations to fade arrow in/out
      • use [[ ARROWT ALL ]] to specify all generations
    • new script command [[ ARROWANGLE <0..359> (FIXED) ]]
      • sets the arrow angle for subsequent arrow definitions
      • optional keyword FIXED means arrow will not rotate when camera rotates
    • new script command [[ COLOR ARROW R G B|<name>]]
      • set arrow colour for subsequent arrow definitions
    • new script command [[ ARROWTARGET X Y D|OFF ]]
      • sets the target point and distance for subsequent arrow definitions
      • the viewpoint must be within the distance of the target point for the arrow to be displayed
      • [[ ARROWTARGET OFF ]] turns off the target for subsequent arrow definitions
    • new script command [[ ARROWTRACK DX DY|FIXED ]]
      • sets movement vector for subsequent arrow definitions
      • [[ ARROWTRACK FIXED ]] turns off movement for subsequent arrow definitions
  • new script command [[ AUTOHIDEGUI ]] will hide GUI while playing - test
    • click while playing to pause and show GUI
    • hotkeys are still enabled
  • new script command [[ NOPERFWARNING ]]
    • removes GPS/STEP shading when performance is slow
  • hotkeys Ctrl-Left, Ctrl-Right, Ctrl-Up and Ctrl-Down can be used for Page Up, Page Down, Home and End
  • bottom right menu now has Prev and Next buttons to go to previous and next universe when in Multiverse mode
Fixes in this build:
  • copy reset position now works when in Multiverse mode
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Build 303 is now available on the lazyslug server
Oh, my, I do like those annotation arrows. So much so that I failed to notice that this build wasn't officially a Release Candidate, and I briefly rolled out Build 303 to the forums and wiki using the new conwaylife.com control panel.

It seemed to work fine, but I've rolled it back to 302 for the time being. Probably nobody will have noticed... Has Nathaniel supplied a login for that page yet? I believe I would be allowed to set you up as an admin on the LifeWiki just by checking a box, but if I remember right a separate login/password is needed for the pattern-maintenance-and-now-LifeViewer-maintenance pages.

(I'm somewhat embarrassed to say that I changed the password to match my regular conwaylife.com password, as soon as I got access to the mod.php area. I usually don't re-use passwords, but on the same site it seemed reasonable.)
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:I failed to notice that this build wasn't officially a Release Candidate, and I briefly rolled out Build 303 to the forums and wiki using the new conwaylife.com control panel.
Actually it can be a release candidate now. I hadn't finished tested but it seems OK now so feel free.
dvgrn wrote:Has Nathaniel supplied a login for that page yet? I believe I would be allowed to set you up as an admin on the LifeWiki just by checking a box, but if I remember right a separate login/password is needed for the pattern-maintenance-and-now-LifeViewer-maintenance pages.
No not yet.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 304 is now available on the lazyslug server

Enhancements in this build:
  • added label and arrow definitions to Help information
Fixes in this build:
  • toggle labels was not working if just arrows defined
This build is a Release Candidate.
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Build 304 is now available on the lazyslug server

Enhancements in this build:
  • added label and arrow definitions to Help information
Fixes in this build:
  • toggle labels was not working if just arrows defined
This build is a Release Candidate.
Tested (briefly) and rolled out -- looks good! My only feedback at the moment is

1) I'm going to find it a little hard to remember that the head-vs-body size ratio is a percentage from 1 to 100, but the alpha value is a percentage from 0.00 to 1.00.

2) I think it would be okay to allow a minimum head-vs-body size percentage of zero instead of 1% -- regular lines with no arrowheads, making it possible to draw (for example) translucent polygons around regions, and label things that way.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 305 is now available on the lazyslug server

Enhancements in this build:
  • arrow head size can now be zero to allow for line drawing - test
  • arrow head size is now specified as a multiple of arrow length rather than percentage
    • [[ ARROWSIZE <1..> <0.0..1.0> ]]
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:My only feedback at the moment is...
Feedback incorporated into Release Candidate Build 305. I'll announce the release once 305 is out.
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:
dvgrn wrote:My only feedback at the moment is...
Feedback incorporated into Release Candidate Build 305. I'll announce the release once 305 is out.
Build 305 is live. Can you see the odd visual effect that appears to affect only ARROWSIZE 4, and only when they're rotated by 0, 90, 180, or 270 degrees, and only when they're being drawn at certain (not all) non-integer zooms?
Size-4-arrow-artifact-sample.png
Size-4-arrow-artifact-sample.png (11.17 KiB) Viewed 900 times
It looks a little different for me in the viewer below, but the effect is still definitely there:

Code: Select all

x = 9, y = 5, rule = B3/S23
$bo3b3o$b3o2bo$2bo!
#C [[ X -2 Y 14 ZOOM 13.6 ANGLE 0 ]]
#C [[ THEME Blues WIDTH 480 HEIGHT 480 ]]
#C Compass direction arrows
#C [[ ARROW 0 0 0 5 8 ]]
#C [[ ARROW 0 0 3.53 3.53 8 ]]
#C [[ ARROW 0 0 5 0 8 ]]
#C [[ ARROW 0 0 3.53 -3.53 8 ]]
#C [[ ARROW 0 0 -5 0 8 ]]
#C [[ ARROW 0 0 -3.53 3.53 8 ]]
#C [[ ARROW 0 0 -3.53 -3.53 8 ]]
#C [[ ARROW 0 0 0 -5 8 ]]
#C Colours
#C [[ COLOR ARROW Red ]]
#C [[ ARROW 6 0 6 7 8 ]]
#C [[ COLOR ARROW Green ]]
#C [[ ARROW 6 0 6 -7 8 ]]
#C [[ COLOR ARROW Blue ]]
#C [[ ARROW 6 0 13 0 8 ]]
#C [[ COLOR ARROW Cyan ]]
#C Sizes
#C [[ ARROWSIZE 1 0.2 ]]
#C [[ ARROW 0 10 6 10 8 ]]
#C [[ ARROWSIZE 2 0.2 ]]
#C [[ ARROW 0 14 6 14 8 ]]
#C [[ ARROWSIZE 3 0.2 ]]
#C [[ ARROW 0 18 6 18 8 ]]
#C [[ ARROWSIZE 4 0.2 ]]
#C [[ ARROW 0 22 6 22 8 ]]
#C [[ ARROWSIZE 1 0.4 ]]
#C [[ ARROW 10 10 16 10 8 ]]
#C [[ ARROWSIZE 2 0.4 ]]
#C [[ ARROW 10 14 16 14 8 ]]
#C [[ ARROWSIZE 3 0.4 ]]
#C [[ ARROW 10 18 16 18 8 ]]
#C [[ ARROWSIZE 4 0.4 ]]
#C [[ ARROW 10 22 16 22 8 ]]
#C [[ ARROWSIZE 3 0.2 ]]
#C Angles
#C [[ ARROWANGLE 30 ]]
#C [[ ARROW 15 0 24 0 8 ]]
#C [[ ARROWANGLE 60 ]]
#C [[ ARROW 15 0 24 0 8 ]]
#C The yellow arrow has a fixed angle
#C [[ ARROWANGLE 90 FIXED COLOR ARROW Yellow ]]
#C [[ ARROW 15 0 24 0 8 ]]
#C [[ ARROWANGLE 0 COLOR ARROW 240 255 255 ]]
#C Tracking
#C [[ ARROWTRACK -0.25 -0.25 ]]
#C [[ ARROW 43.5 36 39.5 32 8 ]]
#C [[ ARROWTRACK FIXED ]]
#C Lines
#C Draw square
#C [[ ARROWSIZE 3 0 ]]
#C [[ ARROW 0 -10 5 -10 8 ]]
#C [[ ARROW 5 -10 5 -15 8 ]]
#C [[ ARROW 5 -15 0 -15 8 ]]
#C [[ ARROW 0 -15 0 -10 8 ]]
# Draw green triangle
#C [[ COLOR ARROW Green ]]
#C [[ ARROW 10 -10 15 -10 8 ]]
#C [[ ARROW 15 -10 12.5 -15 8 ]]
#C [[ ARROW 12.5 -15 10 -10 8 ]]
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:Can you see the odd visual effect that appears to affect only ARROWSIZE 4, and only when they're rotated by 0, 90, 180, or 270 degrees, and only when they're being drawn at certain (not all) non-integer zooms?
No I don't see it. Below is a screen grab of the Viewer in your post above.

Which browser are you using?
Attachments
arrows.png
arrows.png (28.44 KiB) Viewed 898 times
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:
dvgrn wrote:Can you see the odd visual effect that appears to affect only ARROWSIZE 4, and only when they're rotated by 0, 90, 180, or 270 degrees, and only when they're being drawn at certain (not all) non-integer zooms?
No I don't see it. Below is a screen grab of the Viewer in your post above.

Which browser are you using?
It was Chrome, Version 72.0.3626.119 (Official Build) (64-bit). Relaunched with Chrome Version 72.0.3626.121. The same misdrawn arrow still appears in LifeViewer (but not in your screenshot, so it's not just my eyes...)

In fact, that's the only browser I have installed that is allowing LifeViewer to do its "Show in Viewer" trick on the forums. Internet Explorer and Edge both display only the "Show All" link even after I refresh and wait an unreasonably long time. I don't see the misdrawn arrow in IE at http://lazyslug.no-ip.biz/lifeview/plugin/arrow.html, when I paste in my custom view. The LifeWiki seems to be happy with build 305 in IE.

Come to think of it, I noticed the lack of an "Open in Viewer" link in IE, for some other relatively recent build, but didn't have time to investigate then. I don't usually use IE (surprise surprise).

I looked around on the IE Developer Console for error messages when I load a forum page, but can't seem to see anything out of the ordinary. What IE security settings might be keeping the plugin from running?
IE-scripting-settings.png
IE-scripting-settings.png (20.86 KiB) Viewed 894 times
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 306 is now available on the lazyslug server

Fixes in this build:
  • fixes for IE and Edge
This build is a Release Candidate.
Locked