Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Convolutions?V=2
QUERY_STRINGV=2
CONTENT_TYPE
DOCUMENT_URI/revision/Convolutions
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR173.245.54.190
REMOTE_PORT25026
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip
HTTP_CF_IPCOUNTRYUS
HTTP_X_FORWARDED_FOR3.230.119.106
HTTP_CF_RAY5da29b8ccdd52624-IAD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
HTTP_CF_REQUEST_ID05797f8bff0000262435a00200000001
HTTP_CF_CONNECTING_IP3.230.119.106
HTTP_CDN_LOOPcloudflare

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit Convolutions **\ Description\ **\ \n\n\[Keith\ Vetter\]\ 2004-05-20\ :\ Recently\ \[Setok\]\ posted\ a\ article\ \n\[http://www.google.com/groups?selm=eGLqc.2103%24s86.490%40reader1.news.jippii.net&output=gplain\]\non\ \[comp.lang.tcl\]\ that\ had\ a\ link\ to\ an\ interesting\ tcl\ script.\nThe\ script\ was\ a\ tcl\ port\ of\ a\ perl\ script\ that\ was\ an\ ASCII\nanimation\ invitation\ designed\ to\ be\ run\ on\ a\ vt100.\n\nBelow\ is\ a\ tk\ port\ of\ that\ program\;\ I\ have\ no\ idea\ how\nit\ works,\ I\ just\ added\ a\ GUI\ to\ it.\n\n**\ Changes\ **\n\n\[PYK\]\ 2012-12-03:\ removed\ \[update\]\ and\ \[vwait\]\n\n**\ Code\ **\n\n=======\n##+##########################################################################\n#\n#\ Convolutions.tcl\ -\ a\ tk\ port\ of\ a\ tcl\ port\ by\ Setok\ Lawson\ of\ a\ perl\n#\ program\ written\ by\ Mikko\ \"Ravel\"\ Tuomela.\ The\ original\ program\ was\n#\ designed\ as\ a\ party\ invitation\ to\ be\ run\ on\ a\ vt100.\n#\ See\ http://www.altparty.org/archive/invi.tcl\n#\n#\ -\ original\ Alternative\ Party\ 2003\ invitation\ intro\ by\ Mikko\ \"Ravel\"\n#\ \ \ Tuomela\ on\ 18-Nov-2002\n#\ -\ conversion\ by\ Kristoffer\ \"Setok\"\ Lawson\ from\ the\ original\ perl\n#\ \ \ code\ with\ several\ optimisations\ making\ it\ noticably\ faster.\n#\ -\ conversion\ to\ tk\ by\ Keith\ Vetter\n\ \npackage\ require\ Tcl\ 8.4\npackage\ require\ Tk\n\ \nset\ S(title)\ \"Convolutions\"\nset\ S(columns)\ 80\nset\ S(rows)\ 40\nset\ S(ObAmount)\ 2\n\ \nset\ S(MaxColumns)\ 100\nset\ S(MaxRows)\ 100\n\ \nset\ S(go)\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ For\ starting\ and\ stopping\nset\ S(precalc)\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Flag\ for\ precalc\ needed\nset\ S(pause)\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Variable\ to\ vwait\ on\nset\ S(reset)\ 0\n\ \nset\ Chars\ \{\n\ \ \ \ \"OOOO\ \ \ \ \"\n\ \ \ \ \"\ \ .,+o\$M\"\n\ \ \ \ \"@@\ ==\ @@\"\n\ \ \ \ \"-\\\"!*.._#\"\n\ \ \ \ \"OO\ \ OO\ \ \"\n\ \ \ \ \"M¤o+,.\ \ \"\n\ \ \ \ \"O\ O\ O\ O\ \"\n\ \ \ \ \"OO\ \ \ \ \ \ \"\n\ \ \ \ \"..\ \ MM\ \ \"\n\}\n\ \n\ \nset\ Text\ \{\n\ \ \ \ \"\ \ \ Ravel\ and\ Setok\ present\ \ \ \ \"\n\ \ \ \ \"\ \ \ a\ Sleber\ Eid\ production\ \ \ \ \"\ \n\ \ \ \ \"\ \ \ the\ first\ ever\ Tcl\ demo!\ \ \ \"\n\ \ \ \ \"\ \ \ and\ an\ invitation\ to\ \ \ \ \ \ \ \"\n\ \ \ \ \"\ \ \ Alternative\ Party\ 2003\ \ \ \ \ \"\n\ \ \ \ \"\ \ \ 10th-12th\ January\ 2003\ \ \ \ \ \"\n\ \ \ \ \"\ \ \ Gloria\ Helsinki\ Finland\ \ \ \ \"\n\ \ \ \ \"\ \ \ http://www.altparty.org/\ \ \ \"\n\ \ \ \ \"\ \ \ Press\ Ctrl-C\ to\ stop\ \ \ \ \ \ \ \"\n\}\n\ \nset\ Text\ \{\n\ \ \ \ \"Keith\ Vetter\ presents\"\n\ \ \ \ \"a\ tk\ port\"\n\ \ \ \ \"of\ a\ tcl\ port\ by\ Setok\ Lawson\"\n\ \ \ \ \"of\ a\ perl\ program\ by\ Ravel\ Tuomela\"\n\ \ \ \ \"http://www.altparty.org/\"\n\}\n\ \n\ \n#\ Weird\ construct:\ \$effectCode\ is\ a\ procedure\ template\ which\ gets\n#\ modified\ via\ string\ map\ for\ each\ different\ effect.\n#\n#\ The\ text\ %HEIGHT%\ from\ the\ code\ should\ be\ replaced\ (f.ex.\ by\ using\n#\ \[string\ map\])\ with\ the\ code\ to\ set\ the\ value\ for\ height\ of\ that\n#\ particular\ character.\n#\ The\ text\ %HEIGHTLIMITER%\ should\ be\ replace\ with\ the\ code\ to\ convert\n#\ an\ existing\ height\ value\ (in\ the\ 'height'\ variable)\ with\ a\ value\n#\ that\ limits\ it\ to\ 0-7.\n\ \n#\n#\ Variables\ that\ can\ be\ used\ at\ the\ point\ of\ %HEIGHT%\ execution:\n#\ 'x','y'\ \ \ X\ and\ Y\ position\ of\ character\ being\ drawn.\n#\ 'ob\ \ \ Number\ of\ object\ handled.\n#\ 'obCenterX',\ 'obCenterY'\ \ \ X\ and\ Y\ position\ of\ object\ center.\n#\ 'distance'\ \ Two-dimensional\ distance\ table.\n#\ 'altDistance'\ \ Alternative\ to\ 'distance'.\n#\ 'S(ObAmount)'\ \ Amount\ of\ objects.\n#\ 'obNum'\ \ Set\ to\ 0,\ increase\ in\ the\ loop\ if\ you\ need\ it.\n#\n#\ At\ %HEIGHTLIMITER%\ the\ additional\ 'height'\ variable\ can\ be\ used.\n#\n#\ No,\ not\ the\ most\ beautiful\ possible.\n\ \nset\ effectCode\ \{\n\ \ \ \ global\ part\ Chars\ S\ Text\ Part\n\n\ \ \ \ if\ \{\$part\ <\ \[llength\ \$Text\]\}\ \{\n\ \ \ \ \ \ \ \ set\ charset\ \[split\ \[lindex\ \$Chars\ \$part\]\ \"\"\]\n\ \ \ \ \ \ \ \ set\ msg\ \[lindex\ \$Text\ \$part\]\n\n\ \ \ \ \ \ \ \ apply\ \{\{time\ effect\ msg\ charset\ distance\ coords\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ global\ part\ S\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$time\ <=\ 100\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$S(go)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #if\ \{\$S(reset)\}\ return\ \ \;#\ Reset,\ so\ starts\ anew\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$S(reset)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ after\ idle\ \[list\ \$effect\ \$::Distance\ \$::Coords\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ S(reset)\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ full\ \"\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ y\ 0\}\ \{\$y\ <=\ \$S(rows)\}\ \{incr\ y\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ x\ 0\}\ \{\$x\ <=\ \$S(columns)\}\ \{incr\ x\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ height\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ flipflop\ 1\ \ \;#\ Required\ by\ FX\ 2\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ ob\ \$coords\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ height\ %HEIGHT%\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ height\ %HEIGHTLIMITER%\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ append\ full\ \[lindex\ \$charset\ \$height\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \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ns))\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lset\ coords\ \$ob\ 2\ \[expr\ \{-\[lindex\ \$coords\ \$ob\ 2\]\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{(\[lindex\ \$coords\ \$ob\ 1\]\ <\ 0)\ ||\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\[lindex\ \$coords\ \$ob\ 1\]\ >\ \$S(rows))\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lset\ coords\ \$ob\ 3\ \[expr\ \{-\[lindex\ \$coords\ \$ob\ 3\]\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lset\ coords\ \$ob\ 4\ \[expr\ \{int(\[lindex\ \$coords\ \$ob\ 0\])\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lset\ coords\ \$ob\ 5\ \[expr\ \{int(\[lindex\ \$coords\ \$ob\ 1\])\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ time\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ after\ idle\ \[lrange\ \[info\ level\ 0\]\ 0\ 1\]\ \[list\ \$time\ \$effect\ \$msg\ \$charset\ \$distance\ \$coords\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ part\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ after\ idle\ \[list\ \$effect\ \$distance\ \$coords\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\}\ 0\ \[lindex\ \[info\ level\ 0\]\ 0\]\ \$msg\ \$charset\ \$distance\ \$coords\n\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ incr\ ::eidx\n\ \ \ \ \}\n\}\n\n\ \n#\ For\ testing\ purposes.\ We\ want\ the\ output\ to\ be\ exactly\ the\ same\ every\ time.\n##expr\ \{srand(5)\}\n\ \nproc\ precalc\ \{\}\ \{\n\ \ \ \ global\ Distance\ AltDistance\ Coords\ S\n\ \n\ \ \ \ set\ Distance\ \{\}\n\ \ \ \ set\ AltDistance\ \{\}\n\ \ \ \ set\ Coords\ \{\}\n\ \n\ \ \ \ for\ \{set\ x\ 0\}\ \{\$x\ <=\ 200\}\ \{incr\ x\}\ \{\n\ \ \ \ \ \ \ \ set\ innerDistance\ \[list\]\n\ \ \ \ \ \ \ \ set\ innerAltDistance\ \[list\]\n\ \ \ \ \ \ \ \ for\ \{set\ y\ 0\}\ \{\$y\ <=\ 200\}\ \{incr\ y\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ innerDistance\ \[expr\ \{\ int(sqrt(pow(\$x,\ 2)\ +\ pow(\$y,\ 2)))\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ innerAltDistance\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ int(sqrt(abs(pow(\$x,\ 2)\ -\ pow(\$y,\ 2))))\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ lappend\ Distance\ \$innerDistance\n\ \ \ \ \ \ \ \ lappend\ AltDistance\ \$innerAltDistance\n\ \ \ \ \}\n\ \n\ \ \ \ for\ \{set\ ob\ 0\}\ \{\$ob\ <\ \$S(ObAmount)\}\ \{incr\ ob\}\ \{\n\ \ \ \ \ \ \ \ set\ inner\ \[list\ \[expr\ \{\ rand()\ *\ \$S(columns)\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ rand()\ *\ \$S(rows)\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ rand()\ *\ 2\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ rand()\ *\ 2\}\]\]\n\ \ \ \ \ \ \ \ lappend\ inner\ \[expr\ \{\ int(\[lindex\ \$inner\ 0\])\}\]\n\ \ \ \ \ \ \ \ lappend\ inner\ \[expr\ \{\ int(\[lindex\ \$inner\ 1\])\}\]\n\ \ \ \ \ \ \ \ if\ \{rand()*10\ <\ 5\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ inner\ 2\ \"-\[lindex\ \$inner\ 2\]\"\n\ \ \ \ \ \ \ \ \}\ \n\ \ \ \ \ \ \ \ if\ \{rand()*10\ <\ 5\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ inner\ 3\ \"-\[lindex\ \$inner\ 3\]\"\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ lappend\ Coords\ \$inner\n\ \ \ \ \}\n\}\n\ \n\ \nproc\ effect1\ \{distance\ coords\}\ \\\n\ \ \ \ \[string\ map\ \{\n\ \ \ \ \ \ \ \ %HEIGHT%\ \{\[expr\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[lindex\ \$distance\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$x\ -\ \[lindex\ \$ob\ 4\])\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$y\ -\ \[lindex\ \$ob\ 5\])\}\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &\ 0x7\}\]\}\n\ \ \ \ \ \ \ \ %HEIGHTLIMITER%\ \{\[expr\ \{\$height\ /\ \$S(ObAmount)\}\]\}\n\ \ \ \ \}\ \$effectCode\]\n\ \n\ \n\ \nproc\ effect2\ \{distance\ coords\}\ \\\n\ \ \ \ \[string\ map\ \{\n\ \ \ \ \ \ \ \ %HEIGHT%\ \{\[expr\ \{\$flipflop\ *\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[lindex\ \$distance\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$x\ -\ \[lindex\ \$ob\ 4\])\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$y\ -\ \[lindex\ \$ob\ 5\])\}\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\]\n\ \ \ \ \ \ \ \ \ \ \ \ #\ \ \ \ \ \ \ incr\ obNum\n\ \ \ \ \ \ \ \ \ \ \ \ set\ flipflop\ \[expr\ \{-\$flipflop\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ %HEIGHTLIMITER%\ \{\[expr\ \{\$height\ %\ 8\}\]\}\n\ \ \ \ \}\ \$effectCode\]\n\ \n##+##########################################################################\n#\ \n#\ DoDisplay\ --\ puts\ up\ our\ GUI\n#\ \nproc\ DoDisplay\ \{\}\ \{\n\ \ \ \ global\ S\n\ \ \ \ \n\ \ \ \ wm\ title\ .\ \$::S(title)\n\ \ \ \ wm\ protocol\ .\ WM_DELETE_WINDOW\ exit\n\ \ \ \ frame\ .ctrl\ -relief\ ridge\ -bd\ 2\ -padx\ 5\ -pady\ 5\n\ \ \ \ frame\ .screen\ -bd\ 0\ -relief\ raised\n\ \n\ \ \ \ pack\ .ctrl\ -side\ left\ -fill\ both\ -ipady\ 5\n\ \ \ \ pack\ .screen\ -side\ right\ -fill\ both\ -expand\ 1\n\ \n\ \ \ \ label\ .t\ -font\ \{Courier\ 8\}\ -textvariable\ S(txt)\ -relief\ ridge\ \\\n\ \ \ \ \ \ \ \ -height\ \[expr\ \{\$::S(rows)+1\}\]\ -width\ \[expr\ \{\$::S(columns)\ +\ 1\}\]\ \n\ \ \ \ label\ .l\ -textvariable\ S(msg)\n\ \ \ \ .l\ configure\ \ -font\ \"\[font\ actual\ \[.l\ cget\ -font\]\]\ -weight\ bold\"\n\ \ \ \ option\ add\ *font\ \[.l\ cget\ -font\]\n\ \ \ \ \n\ \ \ \ pack\ .t\ -side\ top\ -fill\ both\ -expand\ 1\ -in\ .screen\n\ \ \ \ pack\ .l\ -side\ bottom\ -fill\ x\ -expand\ 1\ -in\ .screen\n\ \n\ \ \ \ scale\ .rows\ -from\ 10\ -to\ \$S(MaxRows)\ -command\ \{Resize\ rows\}\ -orient\ h\ \\\n\ \ \ \ \ \ \ \ -variable\ S(rows)\ -relief\ raised\ -label\ Rows\n\ \ \ \ scale\ .cols\ -from\ 10\ -to\ \$S(MaxColumns)\ -command\ \{Resize\ cols\}\ -orient\ h\ \\\n\ \ \ \ \ \ \ \ -variable\ S(columns)\ -relief\ raised\ -label\ Columns\n\ \ \ \ scale\ .objs\ -from\ 1\ -to\ 8\ -command\ \{Resize\ objs\}\ -orient\ h\ \\\n\ \ \ \ \ \ \ \ -variable\ S(ObAmount)\ -relief\ raised\ -label\ \"Objects\"\n\ \n\ \ \ \ checkbutton\ .stop\ -variable\ S(go)\ -command\ StartStop\ -text\ \"Pause\"\ \\\n\ \ \ \ \ \ \ \ -relief\ raised\n\ \n\ \ \ \ grid\ .rows\ -in\ .ctrl\ -sticky\ ew\ -row\ 0\n\ \ \ \ grid\ .cols\ -in\ .ctrl\ -sticky\ ew\n\ \ \ \ grid\ .objs\ -in\ .ctrl\ -sticky\ ew\n\ \ \ \ grid\ .stop\ -in\ .ctrl\ -pady\ 50\ -sticky\ ew\ -ipady\ 5\n\ \n\ \ \ \ grid\ rowconfigure\ .ctrl\ 100\ -weight\ 1\n\ \ \ \ bind\ all\ <Key-F2>\ \{console\ show\}\n\}\n##+##########################################################################\n#\ \n#\ Show\ --\ displays\ current\ screen\ and\ message\n#\ \nproc\ Show\ \{what\ msg\}\ \{\n\ \ \ \ set\ ::S(txt)\ \[string\ trimright\ \$what\]\n\ \ \ \ set\ ::S(msg)\ \$msg\n\ \ \ \ update\n\}\n##+##########################################################################\n#\ \n#\ Resize\ --\ called\ when\ screen\ is\ resized\ or\ number\ of\ objects\ changes\n#\ \nproc\ Resize\ \{args\}\ \{\n\ \ \ \ .t\ config\ -height\ \[expr\ \{\$::S(rows)+1\}\]\ -width\ \[expr\ \{\$::S(columns)\ +\ 1\}\]\n\ \ \ \ set\ ::S(precalc)\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Need\ to\ recalc\ everything\n\}\n##+##########################################################################\n#\ \n#\ StartStop\ --\ starts\ or\ stops\ the\ current\ display\n#\ \nproc\ StartStop\ \{\}\ \{\n\ \ \ \ global\ S\n\ \ \ \ \n\ \ \ \ if\ \{\$S(go)\}\ \{\n\ \ \ \ \ \ \ \ set\ fg\ \[.l\ cget\ -disabledforeground\]\n\ \ \ \ \ \ \ \ .rows\ config\ -state\ disabled\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .cols\ config\ -state\ disabled\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .objs\ config\ -state\ disabled\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .stop\ config\ -text\ \"Pause\"\n\ \ \ \ \ \ \ \ if\ \{\$S(precalc)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ precalc\n\ \ \ \ \ \ \ \ \ \ \ \ set\ S(precalc)\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ set\ S(reset)\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Tell\ paused\ code\ to\ return\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ S(reset)\ 0\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ S(pause)\ 0\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ fg\ \[.l\ cget\ -foreground\]\n\ \ \ \ \ \ \ \ .rows\ config\ -state\ normal\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .cols\ config\ -state\ normal\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .objs\ config\ -state\ normal\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .stop\ config\ -text\ \"Start\"\n\ \ \ \ \}\n\}\n\ \n\ \nDoDisplay\nStartStop\nprecalc\n\nset\ effects\ \{\ \n\ \ \ \ \{effect1\ \$Distance\ \$Coords\}\n\ \ \ \ \{effect1\ \$AltDistance\ \$Coords\}\n\ \ \ \ \{effect2\ \$Distance\ \$Coords\}\n\ \ \ \ \{effect2\ \$AltDistance\ \$Coords\}\n\}\n\ntrace\ add\ variable\ eidx\ write\ \{\n\ \ \ \ set\ part\ 0\n\ \ \ \ after\ 0\ \{eval\ \[lindex\ \$::effects\ \[expr\ \{\$eidx\ %\ \[llength\ \$::effects\]\}\]\]\}\n\ \ \ \ #\ this\ backslash\ eats\ the\ arguments\ to\ the\ trace\ \\\n\}\n\nset\ eidx\ 0\n======\n\n<<categories>>\ Animation\ |\ Graphics\ |\ Application\ |\ Toys regexp2} CALL {my render Convolutions **\ Description\ **\ \n\n\[Keith\ Vetter\]\ 2004-05-20\ :\ Recently\ \[Setok\]\ posted\ a\ article\ \n\[http://www.google.com/groups?selm=eGLqc.2103%24s86.490%40reader1.news.jippii.net&output=gplain\]\non\ \[comp.lang.tcl\]\ that\ had\ a\ link\ to\ an\ interesting\ tcl\ script.\nThe\ script\ was\ a\ tcl\ port\ of\ a\ perl\ script\ that\ was\ an\ ASCII\nanimation\ invitation\ designed\ to\ be\ run\ on\ a\ vt100.\n\nBelow\ is\ a\ tk\ port\ of\ that\ program\;\ I\ have\ no\ idea\ how\nit\ works,\ I\ just\ added\ a\ GUI\ to\ it.\n\n**\ Changes\ **\n\n\[PYK\]\ 2012-12-03:\ removed\ \[update\]\ and\ \[vwait\]\n\n**\ Code\ **\n\n=======\n##+##########################################################################\n#\n#\ Convolutions.tcl\ -\ a\ tk\ port\ of\ a\ tcl\ port\ by\ Setok\ Lawson\ of\ a\ perl\n#\ program\ written\ by\ Mikko\ \"Ravel\"\ Tuomela.\ The\ original\ program\ was\n#\ designed\ as\ a\ party\ invitation\ to\ be\ run\ on\ a\ vt100.\n#\ See\ http://www.altparty.org/archive/invi.tcl\n#\n#\ -\ original\ Alternative\ Party\ 2003\ invitation\ intro\ by\ Mikko\ \"Ravel\"\n#\ \ \ Tuomela\ on\ 18-Nov-2002\n#\ -\ conversion\ by\ Kristoffer\ \"Setok\"\ Lawson\ from\ the\ original\ perl\n#\ \ \ code\ with\ several\ optimisations\ making\ it\ noticably\ faster.\n#\ -\ conversion\ to\ tk\ by\ Keith\ Vetter\n\ \npackage\ require\ Tcl\ 8.4\npackage\ require\ Tk\n\ \nset\ S(title)\ \"Convolutions\"\nset\ S(columns)\ 80\nset\ S(rows)\ 40\nset\ S(ObAmount)\ 2\n\ \nset\ S(MaxColumns)\ 100\nset\ S(MaxRows)\ 100\n\ \nset\ S(go)\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ For\ starting\ and\ stopping\nset\ S(precalc)\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Flag\ for\ precalc\ needed\nset\ S(pause)\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Variable\ to\ vwait\ on\nset\ S(reset)\ 0\n\ \nset\ Chars\ \{\n\ \ \ \ \"OOOO\ \ \ \ \"\n\ \ \ \ \"\ \ .,+o\$M\"\n\ \ \ \ \"@@\ ==\ @@\"\n\ \ \ \ \"-\\\"!*.._#\"\n\ \ \ \ \"OO\ \ OO\ \ \"\n\ \ \ \ \"M¤o+,.\ \ \"\n\ \ \ \ \"O\ O\ O\ O\ \"\n\ \ \ \ \"OO\ \ \ \ \ \ \"\n\ \ \ \ \"..\ \ MM\ \ \"\n\}\n\ \n\ \nset\ Text\ \{\n\ \ \ \ \"\ \ \ Ravel\ and\ Setok\ present\ \ \ \ \"\n\ \ \ \ \"\ \ \ a\ Sleber\ Eid\ production\ \ \ \ \"\ \n\ \ \ \ \"\ \ \ the\ first\ ever\ Tcl\ demo!\ \ \ \"\n\ \ \ \ \"\ \ \ and\ an\ invitation\ to\ \ \ \ \ \ \ \"\n\ \ \ \ \"\ \ \ Alternative\ Party\ 2003\ \ \ \ \ \"\n\ \ \ \ \"\ \ \ 10th-12th\ January\ 2003\ \ \ \ \ \"\n\ \ \ \ \"\ \ \ Gloria\ Helsinki\ Finland\ \ \ \ \"\n\ \ \ \ \"\ \ \ http://www.altparty.org/\ \ \ \"\n\ \ \ \ \"\ \ \ Press\ Ctrl-C\ to\ stop\ \ \ \ \ \ \ \"\n\}\n\ \nset\ Text\ \{\n\ \ \ \ \"Keith\ Vetter\ presents\"\n\ \ \ \ \"a\ tk\ port\"\n\ \ \ \ \"of\ a\ tcl\ port\ by\ Setok\ Lawson\"\n\ \ \ \ \"of\ a\ perl\ program\ by\ Ravel\ Tuomela\"\n\ \ \ \ \"http://www.altparty.org/\"\n\}\n\ \n\ \n#\ Weird\ construct:\ \$effectCode\ is\ a\ procedure\ template\ which\ gets\n#\ modified\ via\ string\ map\ for\ each\ different\ effect.\n#\n#\ The\ text\ %HEIGHT%\ from\ the\ code\ should\ be\ replaced\ (f.ex.\ by\ using\n#\ \[string\ map\])\ with\ the\ code\ to\ set\ the\ value\ for\ height\ of\ that\n#\ particular\ character.\n#\ The\ text\ %HEIGHTLIMITER%\ should\ be\ replace\ with\ the\ code\ to\ convert\n#\ an\ existing\ height\ value\ (in\ the\ 'height'\ variable)\ with\ a\ value\n#\ that\ limits\ it\ to\ 0-7.\n\ \n#\n#\ Variables\ that\ can\ be\ used\ at\ the\ point\ of\ %HEIGHT%\ execution:\n#\ 'x','y'\ \ \ X\ and\ Y\ position\ of\ character\ being\ drawn.\n#\ 'ob\ \ \ Number\ of\ object\ handled.\n#\ 'obCenterX',\ 'obCenterY'\ \ \ X\ and\ Y\ position\ of\ object\ center.\n#\ 'distance'\ \ Two-dimensional\ distance\ table.\n#\ 'altDistance'\ \ Alternative\ to\ 'distance'.\n#\ 'S(ObAmount)'\ \ Amount\ of\ objects.\n#\ 'obNum'\ \ Set\ to\ 0,\ increase\ in\ the\ loop\ if\ you\ need\ it.\n#\n#\ At\ %HEIGHTLIMITER%\ the\ additional\ 'height'\ variable\ can\ be\ used.\n#\n#\ No,\ not\ the\ most\ beautiful\ possible.\n\ \nset\ effectCode\ \{\n\ \ \ \ global\ part\ Chars\ S\ Text\ Part\n\n\ \ \ \ if\ \{\$part\ <\ \[llength\ \$Text\]\}\ \{\n\ \ \ \ \ \ \ \ set\ charset\ \[split\ \[lindex\ \$Chars\ \$part\]\ \"\"\]\n\ \ \ \ \ \ \ \ set\ msg\ \[lindex\ \$Text\ \$part\]\n\n\ \ \ \ \ \ \ \ apply\ \{\{time\ effect\ msg\ charset\ distance\ coords\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ global\ part\ S\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$time\ <=\ 100\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$S(go)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ #if\ \{\$S(reset)\}\ return\ \ \;#\ Reset,\ so\ starts\ anew\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$S(reset)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ after\ idle\ \[list\ \$effect\ \$::Distance\ \$::Coords\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ S(reset)\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ full\ \"\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ y\ 0\}\ \{\$y\ <=\ \$S(rows)\}\ \{incr\ y\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ x\ 0\}\ \{\$x\ <=\ \$S(columns)\}\ \{incr\ x\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ height\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ flipflop\ 1\ \ \;#\ Required\ by\ FX\ 2\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ ob\ \$coords\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \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\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ time\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ after\ idle\ \[lrange\ \[info\ level\ 0\]\ 0\ 1\]\ \[list\ \$time\ \$effect\ \$msg\ \$charset\ \$distance\ \$coords\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ part\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ after\ idle\ \[list\ \$effect\ \$distance\ \$coords\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\}\ 0\ \[lindex\ \[info\ level\ 0\]\ 0\]\ \$msg\ \$charset\ \$distance\ \$coords\n\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ incr\ ::eidx\n\ \ \ \ \}\n\}\n\n\ \n#\ For\ testing\ purposes.\ We\ want\ the\ output\ to\ be\ exactly\ the\ same\ every\ time.\n##expr\ \{srand(5)\}\n\ \nproc\ precalc\ \{\}\ \{\n\ \ \ \ global\ Distance\ AltDistance\ Coords\ S\n\ \n\ \ \ \ set\ Distance\ \{\}\n\ \ \ \ set\ AltDistance\ \{\}\n\ \ \ \ set\ Coords\ \{\}\n\ \n\ \ \ \ for\ \{set\ x\ 0\}\ \{\$x\ <=\ 200\}\ \{incr\ x\}\ \{\n\ \ \ \ \ \ \ \ set\ innerDistance\ \[list\]\n\ \ \ \ \ \ \ \ set\ innerAltDistance\ \[list\]\n\ \ \ \ \ \ \ \ for\ \{set\ y\ 0\}\ \{\$y\ <=\ 200\}\ \{incr\ y\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ innerDistance\ \[expr\ \{\ int(sqrt(pow(\$x,\ 2)\ +\ pow(\$y,\ 2)))\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ innerAltDistance\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ int(sqrt(abs(pow(\$x,\ 2)\ -\ pow(\$y,\ 2))))\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ lappend\ Distance\ \$innerDistance\n\ \ \ \ \ \ \ \ lappend\ AltDistance\ \$innerAltDistance\n\ \ \ \ \}\n\ \n\ \ \ \ for\ \{set\ ob\ 0\}\ \{\$ob\ <\ \$S(ObAmount)\}\ \{incr\ ob\}\ \{\n\ \ \ \ \ \ \ \ set\ inner\ \[list\ \[expr\ \{\ rand()\ *\ \$S(columns)\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ rand()\ *\ \$S(rows)\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ rand()\ *\ 2\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{\ rand()\ *\ 2\}\]\]\n\ \ \ \ \ \ \ \ lappend\ inner\ \[expr\ \{\ int(\[lindex\ \$inner\ 0\])\}\]\n\ \ \ \ \ \ \ \ lappend\ inner\ \[expr\ \{\ int(\[lindex\ \$inner\ 1\])\}\]\n\ \ \ \ \ \ \ \ if\ \{rand()*10\ <\ 5\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ inner\ 2\ \"-\[lindex\ \$inner\ 2\]\"\n\ \ \ \ \ \ \ \ \}\ \n\ \ \ \ \ \ \ \ if\ \{rand()*10\ <\ 5\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lset\ inner\ 3\ \"-\[lindex\ \$inner\ 3\]\"\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ lappend\ Coords\ \$inner\n\ \ \ \ \}\n\}\n\ \n\ \nproc\ effect1\ \{distance\ coords\}\ \\\n\ \ \ \ \[string\ map\ \{\n\ \ \ \ \ \ \ \ %HEIGHT%\ \{\[expr\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[lindex\ \$distance\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$x\ -\ \[lindex\ \$ob\ 4\])\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$y\ -\ \[lindex\ \$ob\ 5\])\}\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &\ 0x7\}\]\}\n\ \ \ \ \ \ \ \ %HEIGHTLIMITER%\ \{\[expr\ \{\$height\ /\ \$S(ObAmount)\}\]\}\n\ \ \ \ \}\ \$effectCode\]\n\ \n\ \n\ \nproc\ effect2\ \{distance\ coords\}\ \\\n\ \ \ \ \[string\ map\ \{\n\ \ \ \ \ \ \ \ %HEIGHT%\ \{\[expr\ \{\$flipflop\ *\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[lindex\ \$distance\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$x\ -\ \[lindex\ \$ob\ 4\])\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[expr\ \{abs(\$y\ -\ \[lindex\ \$ob\ 5\])\}\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\]\n\ \ \ \ \ \ \ \ \ \ \ \ #\ \ \ \ \ \ \ incr\ obNum\n\ \ \ \ \ \ \ \ \ \ \ \ set\ flipflop\ \[expr\ \{-\$flipflop\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ %HEIGHTLIMITER%\ \{\[expr\ \{\$height\ %\ 8\}\]\}\n\ \ \ \ \}\ \$effectCode\]\n\ \n##+##########################################################################\n#\ \n#\ DoDisplay\ --\ puts\ up\ our\ GUI\n#\ \nproc\ DoDisplay\ \{\}\ \{\n\ \ \ \ global\ S\n\ \ \ \ \n\ \ \ \ wm\ title\ .\ \$::S(title)\n\ \ \ \ wm\ protocol\ .\ WM_DELETE_WINDOW\ exit\n\ \ \ \ frame\ .ctrl\ -relief\ ridge\ -bd\ 2\ -padx\ 5\ -pady\ 5\n\ \ \ \ frame\ .screen\ -bd\ 0\ -relief\ raised\n\ \n\ \ \ \ pack\ .ctrl\ -side\ left\ -fill\ both\ -ipady\ 5\n\ \ \ \ pack\ .screen\ -side\ right\ -fill\ both\ -expand\ 1\n\ \n\ \ \ \ label\ .t\ -font\ \{Courier\ 8\}\ -textvariable\ S(txt)\ -relief\ ridge\ \\\n\ \ \ \ \ \ \ \ -height\ \[expr\ \{\$::S(rows)+1\}\]\ -width\ \[expr\ \{\$::S(columns)\ +\ 1\}\]\ \n\ \ \ \ label\ .l\ -textvariable\ S(msg)\n\ \ \ \ .l\ configure\ \ -font\ \"\[font\ actual\ \[.l\ cget\ -font\]\]\ -weight\ bold\"\n\ \ \ \ option\ add\ *font\ \[.l\ cget\ -font\]\n\ \ \ \ \n\ \ \ \ pack\ .t\ -side\ top\ -fill\ both\ -expand\ 1\ -in\ .screen\n\ \ \ \ pack\ .l\ -side\ bottom\ -fill\ x\ -expand\ 1\ -in\ .screen\n\ \n\ \ \ \ scale\ .rows\ -from\ 10\ -to\ \$S(MaxRows)\ -command\ \{Resize\ rows\}\ -orient\ h\ \\\n\ \ \ \ \ \ \ \ -variable\ S(rows)\ -relief\ raised\ -label\ Rows\n\ \ \ \ scale\ .cols\ -from\ 10\ -to\ \$S(MaxColumns)\ -command\ \{Resize\ cols\}\ -orient\ h\ \\\n\ \ \ \ \ \ \ \ -variable\ S(columns)\ -relief\ raised\ -label\ Columns\n\ \ \ \ scale\ .objs\ -from\ 1\ -to\ 8\ -command\ \{Resize\ objs\}\ -orient\ h\ \\\n\ \ \ \ \ \ \ \ -variable\ S(ObAmount)\ -relief\ raised\ -label\ \"Objects\"\n\ \n\ \ \ \ checkbutton\ .stop\ -variable\ S(go)\ -command\ StartStop\ -text\ \"Pause\"\ \\\n\ \ \ \ \ \ \ \ -relief\ raised\n\ \n\ \ \ \ grid\ .rows\ -in\ .ctrl\ -sticky\ ew\ -row\ 0\n\ \ \ \ grid\ .cols\ -in\ .ctrl\ -sticky\ ew\n\ \ \ \ grid\ .objs\ -in\ .ctrl\ -sticky\ ew\n\ \ \ \ grid\ .stop\ -in\ .ctrl\ -pady\ 50\ -sticky\ ew\ -ipady\ 5\n\ \n\ \ \ \ grid\ rowconfigure\ .ctrl\ 100\ -weight\ 1\n\ \ \ \ bind\ all\ <Key-F2>\ \{console\ show\}\n\}\n##+##########################################################################\n#\ \n#\ Show\ --\ displays\ current\ screen\ and\ message\n#\ \nproc\ Show\ \{what\ msg\}\ \{\n\ \ \ \ set\ ::S(txt)\ \[string\ trimright\ \$what\]\n\ \ \ \ set\ ::S(msg)\ \$msg\n\ \ \ \ update\n\}\n##+##########################################################################\n#\ \n#\ Resize\ --\ called\ when\ screen\ is\ resized\ or\ number\ of\ objects\ changes\n#\ \nproc\ Resize\ \{args\}\ \{\n\ \ \ \ .t\ config\ -height\ \[expr\ \{\$::S(rows)+1\}\]\ -width\ \[expr\ \{\$::S(columns)\ +\ 1\}\]\n\ \ \ \ set\ ::S(precalc)\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Need\ to\ recalc\ everything\n\}\n##+##########################################################################\n#\ \n#\ StartStop\ --\ starts\ or\ stops\ the\ current\ display\n#\ \nproc\ StartStop\ \{\}\ \{\n\ \ \ \ global\ S\n\ \ \ \ \n\ \ \ \ if\ \{\$S(go)\}\ \{\n\ \ \ \ \ \ \ \ set\ fg\ \[.l\ cget\ -disabledforeground\]\n\ \ \ \ \ \ \ \ .rows\ config\ -state\ disabled\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .cols\ config\ -state\ disabled\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .objs\ config\ -state\ disabled\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .stop\ config\ -text\ \"Pause\"\n\ \ \ \ \ \ \ \ if\ \{\$S(precalc)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ precalc\n\ \ \ \ \ \ \ \ \ \ \ \ set\ S(precalc)\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ set\ S(reset)\ 1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \;#\ Tell\ paused\ code\ to\ return\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ S(reset)\ 0\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ S(pause)\ 0\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ fg\ \[.l\ cget\ -foreground\]\n\ \ \ \ \ \ \ \ .rows\ config\ -state\ normal\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .cols\ config\ -state\ normal\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .objs\ config\ -state\ normal\ -foreground\ \$fg\n\ \ \ \ \ \ \ \ .stop\ config\ -text\ \"Start\"\n\ \ \ \ \}\n\}\n\ \n\ \nDoDisplay\nStartStop\nprecalc\n\nset\ effects\ \{\ \n\ \ \ \ \{effect1\ \$Distance\ \$Coords\}\n\ \ \ \ \{effect1\ \$AltDistance\ \$Coords\}\n\ \ \ \ \{effect2\ \$Distance\ \$Coords\}\n\ \ \ \ \{effect2\ \$AltDistance\ \$Coords\}\n\}\n\ntrace\ add\ variable\ eidx\ write\ \{\n\ \ \ \ set\ part\ 0\n\ \ \ \ after\ 0\ \{eval\ \[lindex\ \$::effects\ \[expr\ \{\$eidx\ %\ \[llength\ \$::effects\]\}\]\]\}\n\ \ \ \ #\ this\ backslash\ eats\ the\ arguments\ to\ the\ trace\ \\\n\}\n\nset\ eidx\ 0\n======\n\n<<categories>>\ Animation\ |\ Graphics\ |\ Application\ |\ Toys} CALL {my revision Convolutions} CALL {::oo::Obj16343738 process revision/Convolutions} CALL {::oo::Obj16343736 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 51)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4