[GRASS-user] New wiki addons script: r.game_of_life

Hi folks,

I just wrote a little script to demonstrate how easy it is to play with
cellular automata in GRASS. It runs both classic and modified versions of
the "Game of Life". In addition, the 3D demo mode demonstrates creating a
raster 3D time-series block; NVIZ isosurfaces and cutting planes; the
xganim map animator; and creating a MPEG-1 movie.

http://grass.gdf-hannover.de/wiki/GRASS_AddOns#Raster_add-ons

It's written to be compatible with 6.2.2, but I've only tested it in
6.3cvs.

My NVIZ crashes when I try to add a raster volume isosurface (6.2.{1,2}
and 6.3cvs; same old vol= bug), so I don't have a fancy screenshot to
post, but if that works for you I'd love to see one looking down into the
blob version evolution using an isosurface somewhere between 0 and 1. (the
"blob" version being mod6, which the 3D mode is hardcoded to use)

I came up with the mod4 and mod6 versions mostly by mistake, if anyone
wants to contribute others, just send the rules over. (In particular
something more blobby than mod6 which would make a nicer isosurface)

For those interested in this sort of thing, I see on the add-ons page
that Peter Löwe has recently added a r.mandelbrot module as well, and
also GRASS's wildfire modules (r.ros/r.spread/r.spreadpath) could use a
maintainer from the community.

I am very happy to note that there are now many scripts listed on the
wiki addons page. In fact, it's busting at the seams. To keep the page
useful we should probably do a few things:

1) Break the grass6 raster and vector sections up into subgroups.
Any suggestions?? Currently they're just in a random order.

2) As many of the scripts are hosted on authors' personal webspace, it
is probably a highly prudent idea to back them up in case that webspace
or the author disappear off the scene. Markus's SVN server already hosts
some of the modules; I was thinking of some automated wget scraping
script to make up a .tgz. (although some links go to personal web pages
with the code down another layer, mmph may have to be done by hand
periodically). If it helps, I am happy to move all my contributions into
the addons SVN. Related:

3) As suggested over on the DebianGIS mailing list (by Frankie??), it
would be nice to package all the addons up into a single grass-addons
.deb/.rpm container. (well all addons that pass the FOSS license tests
anyway).

enjoy,
Hamish

-----Original Message-----
From: grassuser-bounces@grass.itc.it on behalf of Hamish
Sent: Fri 8/24/2007 9:41 AM
To: grass list
Subject: [GRASS-user] New wiki addons script: r.game_of_life

<snip>

2) As many of the scripts are hosted on authors' personal webspace, it
is probably a highly prudent idea to back them up in case that webspace
or the author disappear off the scene. Markus's SVN server already hosts
some of the modules; I was thinking of some automated wget scraping
script to make up a .tgz. (although some links go to personal web pages
with the code down another layer, mmph may have to be done by hand
periodically). If it helps, I am happy to move all my contributions into

I think this is a good idea; I unfortunately don't have access to a dedicated website to host my scripts as of yet, and so I must resort to uploading the scripts to a public-readable ftp server that gets purged weekly (it's only meant for temporary storage, otherwise, everyone leaves their junk up on there and it eventually fills up), so it would be great to have the scripts hosted somewhere more permanent.

~ Eric.

Hi Hamish,

I tried your script with type set to 2d_life, and it seemed to run fine, but I closed the monitor before the script finished (brief aside: does the script actually end at some point, or does it run basically forever?) which seemed to make it hang. I had to kill it the process from the command line. Sorry I don't remember what output was printed to the terminal, if any. If I restart the script and try to run it again, I get the message:

"ERROR: Please remove all memories from past life first:
count.222
life.222"

Logging out and restarting Grass doesn't seem to help; the same message appears.

~ Eric.

-----Original Message-----
From: grassuser-bounces@grass.itc.it on behalf of Hamish
Sent: Fri 8/24/2007 9:41 AM
To: grass list
Subject: [GRASS-user] New wiki addons script: r.game_of_life

Hi folks,

I just wrote a little script to demonstrate how easy it is to play with
cellular automata in GRASS. It runs both classic and modified versions of
the "Game of Life". In addition, the 3D demo mode demonstrates creating a
raster 3D time-series block; NVIZ isosurfaces and cutting planes; the
xganim map animator; and creating a MPEG-1 movie.

http://grass.gdf-hannover.de/wiki/GRASS_AddOns#Raster_add-ons

It's written to be compatible with 6.2.2, but I've only tested it in
6.3cvs.

My NVIZ crashes when I try to add a raster volume isosurface (6.2.{1,2}
and 6.3cvs; same old vol= bug), so I don't have a fancy screenshot to
post, but if that works for you I'd love to see one looking down into the
blob version evolution using an isosurface somewhere between 0 and 1. (the
"blob" version being mod6, which the 3D mode is hardcoded to use)

I came up with the mod4 and mod6 versions mostly by mistake, if anyone
wants to contribute others, just send the rules over. (In particular
something more blobby than mod6 which would make a nicer isosurface)

For those interested in this sort of thing, I see on the add-ons page
that Peter Löwe has recently added a r.mandelbrot module as well, and
also GRASS's wildfire modules (r.ros/r.spread/r.spreadpath) could use a
maintainer from the community.

I am very happy to note that there are now many scripts listed on the
wiki addons page. In fact, it's busting at the seams. To keep the page
useful we should probably do a few things:

1) Break the grass6 raster and vector sections up into subgroups.
Any suggestions?? Currently they're just in a random order.

2) As many of the scripts are hosted on authors' personal webspace, it
is probably a highly prudent idea to back them up in case that webspace
or the author disappear off the scene. Markus's SVN server already hosts
some of the modules; I was thinking of some automated wget scraping
script to make up a .tgz. (although some links go to personal web pages
with the code down another layer, mmph may have to be done by hand
periodically). If it helps, I am happy to move all my contributions into
the addons SVN. Related:

3) As suggested over on the DebianGIS mailing list (by Frankie??), it
would be nice to package all the addons up into a single grass-addons
.deb/.rpm container. (well all addons that pass the FOSS license tests
anyway).

enjoy,
Hamish

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Hamish,

This is way cool. Surprising how short the script is too.

Michael

On 8/24/07 5:41 AM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Hi folks,

I just wrote a little script to demonstrate how easy it is to play with
cellular automata in GRASS. It runs both classic and modified versions of
the "Game of Life". In addition, the 3D demo mode demonstrates creating a
raster 3D time-series block; NVIZ isosurfaces and cutting planes; the
xganim map animator; and creating a MPEG-1 movie.

http://grass.gdf-hannover.de/wiki/GRASS_AddOns#Raster_add-ons

It's written to be compatible with 6.2.2, but I've only tested it in
6.3cvs.

My NVIZ crashes when I try to add a raster volume isosurface (6.2.{1,2}
and 6.3cvs; same old vol= bug), so I don't have a fancy screenshot to
post, but if that works for you I'd love to see one looking down into the
blob version evolution using an isosurface somewhere between 0 and 1. (the
"blob" version being mod6, which the 3D mode is hardcoded to use)

I came up with the mod4 and mod6 versions mostly by mistake, if anyone
wants to contribute others, just send the rules over. (In particular
something more blobby than mod6 which would make a nicer isosurface)

For those interested in this sort of thing, I see on the add-ons page
that Peter Löwe has recently added a r.mandelbrot module as well, and
also GRASS's wildfire modules (r.ros/r.spread/r.spreadpath) could use a
maintainer from the community.

I am very happy to note that there are now many scripts listed on the
wiki addons page. In fact, it's busting at the seams. To keep the page
useful we should probably do a few things:

1) Break the grass6 raster and vector sections up into subgroups.
Any suggestions?? Currently they're just in a random order.

2) As many of the scripts are hosted on authors' personal webspace, it
is probably a highly prudent idea to back them up in case that webspace
or the author disappear off the scene. Markus's SVN server already hosts
some of the modules; I was thinking of some automated wget scraping
script to make up a .tgz. (although some links go to personal web pages
with the code down another layer, mmph may have to be done by hand
periodically). If it helps, I am happy to move all my contributions into
the addons SVN. Related:

3) As suggested over on the DebianGIS mailing list (by Frankie??), it
would be nice to package all the addons up into a single grass-addons
.deb/.rpm container. (well all addons that pass the FOSS license tests
anyway).

enjoy,
Hamish

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Hamish:

>2) As many of the scripts are hosted on authors' personal webspace, it
>is probably a highly prudent idea to back them up in case that webspace
>or the author disappear off the scene. Markus's SVN server already hosts
>some of the modules; I was thinking of some automated wget scraping
>script to make up a .tgz. (although some links go to personal web pages
>with the code down another layer, mmph may have to be done by hand
>periodically). If it helps, I am happy to move all my contributions into

Eric:

I think this is a good idea; I unfortunately don't have access to a dedicated website to host my scripts as of yet, and so I must resort to uploading the scripts to a public-readable ftp server that gets purged weekly (it's only meant for temporary storage, otherwise, everyone leaves their junk up on there and it eventually fills up), so it would be great to have the scripts hosted somewhere more permanent.

Perhaps put them up on Markus's Add-Ons SVN server?
  http://grass.gdf-hannover.de/wiki/GRASS_AddOns#AddOns_source_code_repository

gmail accounts give a bit of free webspace BTW.

Hamish

Patton, Eric wrote:

I tried your script with type set to 2d_life, and it seemed to run fine, but > I closed the monitor before the script finished (brief aside: does the script
actually end at some point, or does it run basically forever?)

It is hardcoded to go 255 iterations, but I should perhaps make it go
$((BOXSIZE - 1)) so the 3D raster becomes a cube. (left at 255)

which seemed to make it hang. I had to kill it the process from the command
line. Sorry I don't remember what output was printed to the terminal, if
any.

the display stuff is all passive to the operation; you'll get lots of
error messages about "cannot find the display", but the model should still
run undisturbed.

If I restart the script and try to run it again, I get the message:

"ERROR: Please remove all memories from past life first:
count.222
life.222"

Logging out and restarting Grass doesn't seem to help; the same message
appears.

sorry, you need to g.remove those raster maps.

I've updated the script a little now to cover these issues, and a 6.2.2
incompatibility pointed out by Len Coop.

still interested to hear if anyone got the 3D isosurface to work.

Hamish