Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/lamont/test/life2/0-gen-tbs.sh
ViewVC logotype

View of /branches/lamont/test/life2/0-gen-tbs.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3363 - (download) (as text) (annotate)
Mon Nov 2 12:48:10 2015 UTC (4 years, 5 months ago) by glk
File size: 710 byte(s)
still debugging a Conway life implementation
#!/usr/bin/env bash
set -o errexit
set -o nounset
JUNK=""
function junk {
  JUNK="$JUNK $@"
}
function cleanup {
  rm -rf $JUNK
}
trap cleanup err exit int term

# the RLE for use in e.g. Golly
#http://www.conwaylife.com/patterns/twinbeesshuttle.rle

curl -O http://www.conwaylife.com/w/images/7/7c/Twinbeesshuttle.png
junk Twinbeesshuttle.png

unu slice -i Twinbeesshuttle.png -a 0 -p 0 |
unu crop -min 0 0 -max M-1 M-1 |
unu resample -s /6 /6 -k cheap |
unu 2op / - 255 |
unu 2op - 1 - |
unu basinfo -orig "(0,0)" -spc "2d-space" |
unu axinfo -a 0 -dir "(1,0)" -k space |
unu axinfo -a 1 -dir "(0,1)" -k space |
unu dnorm -o - |
unu convert -t float |
unu pad -min -2 -2 -max M+2 M+2 -o twinbeesshuttle.nrrd

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0