diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-08-13 12:00:22 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2010-08-13 12:00:22 +0200 |
commit | 0424a2a795fb3da1c18284e2c86dc76c9ac4c0d3 (patch) | |
tree | ee3a3fd8b283d0f8ffa8a33612f5c2920045d247 /mpliferc.lua | |
parent | fd8ab52a6e7a622a46824f2b38e8e499bd471b64 (diff) | |
download | automata-backgrounds-0424a2a795fb3da1c18284e2c86dc76c9ac4c0d3.tar.gz |
config files. frame loading now via LPEG.
Diffstat (limited to 'mpliferc.lua')
-rw-r--r-- | mpliferc.lua | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mpliferc.lua b/mpliferc.lua new file mode 100644 index 0000000..00bd880 --- /dev/null +++ b/mpliferc.lua @@ -0,0 +1,48 @@ +if not mplife then return 1 end + +mplife.setup.rc = {} + +do + local c = {} + + --c.file = "examples/10x10_glider.gol" + --c.file = "examples/gliders.gol" + c.file = "examples/ggun.gol" + --c.file = "examples/sships.gol" + c.rule = gol.parse_rule("B3/S23") -- default Conway + c.init = gol.parse_file(c.file) + c.last = c.init -- for successive mode + + c.pensize = .1 + c.color = { r = .6, g = .6, b = .8 } + c.opacity = 1/3 + c.fade = true + c.gestalt = "unitsquare" -- try "unitcircle" + + c.firstframe = 1 + c.frames = 5 + + c.preamble = [[ +\setupcolors[state=start] +\setupbackgrounds[state=start] +\setuppapersize[S6][S6] + +\setuppagenumbering[state=stop,location=] + +\defineoverlay[back][\ctxlua{mplife.successive()}] + +\setupbackgrounds [page] [background=back] +]] + c.before_frame = [[ +\startMPcode +pickup pencircle xyscaled (.25*]] .. c.pensize .. [[pt, ]] .. c.pensize .. [[pt) rotated 45; +]] + c.after_frame = [[ +currentpicture := currentpicture xysized (\the\paperwidth, \the\paperheight); +\stopMPcode +]] + + mplife.setup.rc = c +end + +return mplife.setup.rc |