Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Iching%5FFortunes?V=226
QUERY_STRINGV=226
CONTENT_TYPE
DOCUMENT_URI/revision/Iching_Fortunes
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR108.162.216.60
REMOTE_PORT46806
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR18.117.182.179
HTTP_CF_RAY87bdd666284be25c-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP18.117.182.179
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit Iching_Fortunes **Iching_Fortunes**\n\nThis\ page\ is\ under\ development.\ Comments\ are\ welcome,\ but\ please\ load\ any\ comments\ in\ the\ comments\ section\ at\ the\ bottom\ of\ the\ page.\ Please\ include\ your\ wiki\ MONIKER\ \ in\ your\ comment\ with\ the\ same\ courtesy\ that\ I\ will\ give\ you.\ Its\ very\ hard\ to\ reply\ intelligibly\ without\ some\ background\ of\ the\ correspondent.\ Thanks,\[gold\]\n----\n\n<<TOC>>\n**Introduction**\n\nThe\ Iching\ is\ the\ ancient\ fortune\ telling\ book\ of\ China.\ The\ Iching\nliterature\ mentions\ various\ methods\ for\ casting\ fortune\ patterns\ of\ Iching.\nThe\ various\ methods\ include\ hot\ ironing\ of\ turtle\ shells\ (-t.),\nmanipulations\ of\ yarrow\ sticks,\ flipping\ coins,\ throwing\ shaman\ bones,\ and\ndice.\ One\ analogy\ from\ North\ America\ is\ a\ shaman\ throwing\ or\ shuffling\ stick\ndice.\n\n----\n\nI\ made\ three\ stick\ dice\ for\ Iching\ by\ cutting\ a\ dowel\ of\ square\ cross\nsection\ into\ three\ sticks.\ For\ the\ three\ stick\ dice,\ the\ flat\ sides\ are\nmarked\ or\ burned\ with\ 2\ or\ 3\ holes\ alternately.\ Two\ sticks\ are\ marked\ with\n\{3\ 2\ 3\ 2\}\ dots\ on\ the\ sides.\ One\ stick\ is\ marked\ with\ \{3\ 3\ 3\ 2\}\ dots\ on\ the\nsides.\ In\ casting\ such\ three\ dice,\ the\ possible\ sums\ are\ 6,7,8,\ or\ 9.\nFurther,\ the\ stick\ dice\ are\ cast\ six\ times\ to\ obtain\ whole\ lines\ or\ broken\nlines\ in\ a\ pattern\ or\ set\ of\ six\ lines.\ A\ set\ of\ six\ Iching\ lines\ is\ called\na\ gua\ in\ the\ orient\ or\ a\ hexagram\ in\ some\ translations\ of\ the\ Chinese.\n\n----\n\nIn\ the\ Iching\ interpretations,\ casts\ of\ 6\ and\ 8\ are\ broken\ or\ yin\ (female)\nlines,\ while\ casts\ of\ 7\ and\ 9\ are\ whole\ or\ yang\ (male)\ lines.\ The\ casts\ are\nrecorded\ by\ pencil\ with\ the\ first\ line\ at\ bottom\ and\ marking\ up\ the\ column.\nIt\ is\ possible\ to\ record\ the\ numbers\ from\ the\ casts\ with\ tally\ sticks\ or\nChinese\ counting\ rods,\ which\ are\ somewhat\ reminiscent\ of\ the\ Iching\ patterns\nthemselves.\ After\ marking\ the\ original\ pattern\ or\ hexagram,\ sometimes\ a\nsecond\ follow-up\ hexagram\ is\ developed\ by\ swapping\ throws\ of\ 6\ for\ a\ 7\ and\nthrows\ of\ 9\ for\ a\ 6.\ These\ swaps\ effectively\ trade\ a\ broken\ line(6)\ for\ a\nwhole\ line(7)\ and\ a\ whole\ line(9)\ for\ a\ broken\ line(6).\ \ The\ throws\ for\ the\nchanging\ lines\ (6&9)\ may\ not\ always\ be\ come\ out\ in\ the\ first\ hexagram\ or\ its\ncomponent\ lines,\ so\ the\ followup\ hexagram\ may\ not\ exist\ \{under\ consistent\nrules\}.\ If\ the\ first\ hexagram\ is\ interpreted\ on\ a\ line\ by\ line\ basis,\ any\nchanging\ lines(6&9)\ or\ second\ hexagram\ offers\ some\ modification\ or\ discount\non\ the\ interpretation\ of\ the\ first\ hexagram.\n\n----\n\nIn\ developing\ a\ computer\ program\ or\ application,\ it\ is\ helpful\ to\ develop\nanalogs\ for\ the\ individual\ tasks\ of\ the\ application.\ An\ Iching\ application\nwould\ have\ to\ compose,\ beg,\ or\ borrow\ TCL\ procedures\ for\ random\ casts,\ntallies\ of\ scores,\ accounting\ files,\ display\ hexagram\ lines\ on\ a\ screen,\nswapping\ changing\ lines,\ hexagram\ pattern\ recognition\ and\ ranking\ninterpretations.\ In\ fact,\ some\ TCL\ one\ liner\ procedures\ and\ text\ swapping\nroutines\ might\ be\ useful\ as\ utilities\ in\ a\ starter\ application\ program,\nsince\ unruly\ text\ strings\ are\ expected\ in\ the\ Iching.\ \ Casting\ the\ sticks\ or\nbones\ for\ each\ Iching\ line\ is\ analog\ for\ random\ lpick\ subroutine\ below.\nAdding\ the\ top\ sides\ of\ three\ sticks\ and\ throwing\ six\ times\ is\ analog\ for\nthe\ \"for\ 6\ times\"\ statement\ in\ the\ bonereadxx\ procedure\ below.\ In\ the\ West,\nLeibniz\ etc\ recognized\ that\ the\ whole\ and\ broken\ lines\ in\ the\ hexagram\npatterns\ could\ be\ counted\ as\ ones\ and\ zeros,\ respectively\ in\ a\ binary\ number\nsystem.\ For\ example,\ a\ cast\ or\ TCL\ list\ of\ \{\ 6,7,8,9,6,7\ \}\ could\ be\nexpressed\ as\ a\ binary\ number,\ 010101.\ The\ binary\ numbers\ are\ the\ analogs\ for\nthe\ binaryexchange\ subroutine\ below.\ \ For\ computer\ procedures,\ the\ patterns\nare\ effectively\ a\ horizontal\ bar\ code\ of\ 6\ lines.\n\n----\n\nIn\ the\ process\ of\ designing\ the\ basic\ subroutine\ tasks,\ we\ could\ throw\ in\nsome\ switches,\ logic\ chains,\ or\ daisy\ chains\ that\ break\ the\ outset\ rules\ngiven\ above.\ For\ example,\ TCL\ is\ so\ good\ at\ swapping\ lines\ (6&9)\ for\ the\nsecond\ hexagram,\ that\ it\ would\ be\ easy\ to\ put\ a\ switch\ that\ generates\ or\nswaps\ all\ hexagram\ lines\ (6,7,8,&9)\ for\ their\ opposites.\ Also\ from\ some\nscripts\ of\ the\ Chinese\ Chou\ dynasty,\ different\ Iching\ fortune\ methods\ of\nyarrow\ sticks\ or\ coins\ would\ generate\ different\ probabilities\ of\ obtaining\neach\ hexagram\ line.\ Might\ be\ interesting\ to\ have\ a\ back\ door\ in\ the\ program\nto\ check\ (or\ adapt\}\ the\ different\ probabilities\ of\ stick\ or\ coin\ throws.\nSeveral\ authors\ have\ pointed\ out\ that\ a\ few\ of\ the\ hexagrams\ look\ similar\ to\nChinese\ characters\ or\ even\ Mayan\ calendar\ notation.\ Without\ wading\ too\ deep\ninto\ alternate\ realities,\ the\ Iching\ hexagrams\ could\ be\ used\ as\ numerals,\nscript\ alphabet,\ game\ tokens,\ symbol\ recognition\ code,\ or\ maybe\ a\nprogramming\ language\ (like\ Greek\ letters\ for\ APL\ operators).\ \ Such\ rule\nbreaking\ helps\ keep\ the\ finished\ program\ more\ flexible.\n\n\n----\n**Screenshots\ Section**\n\n\[http://img175.imageshack.us/img175/5109/ichinggenerator5ab5.jpg\]\n\[http://farm5.static.flickr.com/4136/4812522943_33727ff8ec.jpg\]\n\[http://farm5.static.flickr.com/4114/4812413403_e697523a46.jpg\]\n\n----\n**References**\n\ \ \ *\ http://en.wikipedia.org/wiki/I_Ching\n\ \ \ *\ http://www.kheper.net/topics/I_Ching/hexagrams.htm\n\ \ \ *\ http://www.peaceloveandme.com/images/trigrams.gif\n\ \ \ *\ http://www.anton-heyboer.org/i_ching/choose.htm\n\ \ \ *\ Search\ on\ google.com\ for\ \"site:www.sipp.org\ ching\ hexagrams\"\n\ \ \ *\ http://www.beatrice.com/TAO.txt\n\ \ \ *\ http://members.aol.com/IChing1/index.html\n\ \ \ *\ http://www.sacred-texts.com/ich/index.htm\n\ \ \ *\ http://www.meritbadge.com/mb/notes/064.htm\n\ \ \ *\ http://home.hccnet.nl/vd.heijdt/sub-division.htm\n\ \ \ *\ Search\ on\ google.com\ for\ \"Navaho\ game\ stick\ dice\"\n\ \ \ *\ Search\ on\ google.com\ for\ \"native\ america\ stick\ dice\"\n\ \ \ *\ http://hearstmuseum.berkeley.edu/../gallery_3_5_5.html\n\ \ \ *\ http://www.biroco.com/yijing/stick.htm\n\ \ \ *\ http://mathcentral.uregina.ca/.../treptau1/game3.html\n\ \ \ *\ Search\ on\ google.com\ for\ \"counting\ rods\"\n\ \ \ *\ Search\ on\ Wikipedia\ for\ \"Bagua\ ching\ trigram\ hexagram\"\n\ \ \ *\ http://www.math.sfu.ca/histmath/China/Beginning/Rod.html\n\ \ \ *\ http://mathforum.org/library/drmath/view/52557.html\n\ \ \ *\ http://members.iimetro.com.au/~lofting/myweb/icmaths.html\n\ \ \ *\ http://www.research.att.com/~njas/sequences/A116586\n\ \ \ *\ http://www.circadianacupuncture.com/CAT/iching.html\n\ \ \ *\ Dirk\ Gently's\ Holistic\ I-ching\ Calculator\ \[http://www.thateden.co.uk/dirk/\]\n\ \ \ *\ http://www.bodhitree.com/booklists/i-ching.html\n\ \ \ *\ http://hexadecimal.uoregon.edu/ching/ching.html\n\n**Random\ Divination\ (\ non-Iching)**\n\ \ \ *\ Search\ on\ google.com\ &\ wikipedia\ \ for\ keywords\ :Limyran,\ Lycia,\ Sortes\ Astrampsych,\ thomas\ oracle,\ Bibliomancy\"\n\ \ \ *\ http://www.thing.de/projekte/7:9%23/dream_book.html\n\ \ \ *\ http://www.cs.utk.edu/~mclennan/BA/GAO.html\n\ \ \ *\ http://essenes.net/greekalpha.htm\n\ \ \ *\ http://www.cs.utk.edu/%7Emclennan/BA/LAO.txt\n\ \n**Programming\ References\ (\ TCL\ &\ C#\ )**\n\ \ \ *\ http://www.alanwood.net/unicode/yijing_hexagram_symbols.html\n\ \ \ *\ http://www.unicode.org/charts/PDF/U4DC0.pdf\n\ \ \ *\ http://www.wazu.jp/gallery/Test_AncientChineseSymbols.html\n\ \ \ *\ http://www.unicode.org/charts/PDF/U1D360.pdf\n\ \ \ *\ c#\ based\ program\ as\ http://hexadecimal.uoregon.edu/ching/src.html\n\ \ \ *\ java\ \ http://mason.gmu.edu/~swingo/\n\ \ \ *\ \[Base\ conversion\]\n\ \ \ *\ Syntax\ or\ sin\ tax:\[I\ love\ foreach\]\ \[use\ while\ to\ iterate\ over\ a\ list\]\n\ \ \ *\ \[additional\ list\ functions\],\ \[string\ reverse\],\n\ \ \ *\ \[split\],\ \[list\]\n\ \ \ *\ \[recursive\ list\ searching\]\n----\ \n**Pretty\ Print\ Version**\n======\n\ \ \ \ #!/usr/bin/env\ wish\n\ \ \ \ #\ pretty\ print\ version\ from\ autoindent\ and\ ased\ editor\n\ \ \ \ #Iching_Fortunes\n\ \ \ \ #\ or\ Itching\ For\ Tunes\ \[%>\}\n\ \ \ \ #\ 6Feb2007,\ \[gold\]\n\ \ \ \ #\ working\ on\ XP\ starter\ code\n\ \ \ \ #\ top\ browser\ is\ written\ for\ windows\n\ \ \ \ #\ and\ should\ open\ file\ in\ notepad,\n\ \ \ \ #\ on\ left\ mouse\ click.\n\ \ \ \ package\ require\ Tk\n\ \ \ \ global\ bookvalue\ bookvalue2\n\ \ \ \ set\ colorground\ bisque\n\ \ \ \ set\ wow\ \"bone\ number\"\n\ \ \ \ proc\ xlistlistbox\ \{\}\ \{\n\ \ \ \ \ \ \ \ .labellabel\ delete\ 0\ end\n\ \ \ \ \ \ \ \ foreach\ filefile\ \[glob\ .*\ *\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \[file\ isdirectory\ \$filefile\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ filefile\ \"\$filefile/\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ .labellabel\ insert\ end\ \$filefile\;\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ proc\ xskipskipdirectory\ \{dir\}\ \{\n\ \ \ \ \ \ \ \ cd\ \$dir\n\ \ \ \ \ \ \ \ .realcommand\ configure\ -text\ \[pwd\]\n\ \ \ \ \ \ \ \ xlistlistbox\n\ \ \ \ \}\n\ \ \ \ proc\ clickclicklistbox\ \{\}\ \{\n\ \ \ \ \ \ \ \ catch\ \{\ set\ index\ \[lindex\ \[.labellabel\ curselection\]\ 0\]\ \}\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ if\ \{\ \$index\ ==\ \"\"\ \}\ \{\ return\ \}\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ set\ filename\ \[.labellabel\ get\ \$index\]\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ if\ \[file\ isdirectory\ \$filename\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ xskipskipdirectory\ \$filename\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #exec\ xedit\ \$file\ &\n\ \ \ \ \ \ \ \ \ \ \ \ #\ windows\ editor\n\ \ \ \ \ \ \ \ \ \ \ \ exec\ notepad\ \$filename\}\}\n\ \ \ \ \n\ \ \ \ wm\ title\ .\ \"File\ Starter\"\n\ \ \ \ frame\ .labelframe\n\ \ \ \ pack\ .labelframe\ -expand\ no\ -fill\ x\n\ \ \ \ label\ .labellabel1\ -text\ \"Directory:\"\n\ \ \ \ label\ .realcommand\ -text\ \"\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -relief\ groove\n\ \ \ \ pack\ .labellabel1\ -in\ .labelframe\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -side\ left\ -expand\ no\ -fill\ x\n\ \ \ \ pack\ .realcommand\ -in\ .labelframe\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -side\ left\ -expand\ yes\ -fill\ x\ -anchor\ w\n\ \ \ \ frame\ .listlistbox\n\ \ \ \ pack\ .listlistbox\ -expand\ yes\ -fill\ both\n\ \ \ \ listbox\ .labellabel\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -width\ 25\ -height\ 3\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -xscrollcommand\ \".xxxxaxis\ set\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -yscrollcommand\ \".yyyyaxis\ set\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -bg\ \$colorground\n\ \ \ \ scrollbar\ .yyyyaxis\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \".labellabel\ yview\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -orient\ v\n\ \ \ \ scrollbar\ .xxxxaxis\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \".labellabel\ xview\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -orient\ h\n\ \ \ \ pack\ .xxxxaxis\ -in\ .listlistbox\ -side\ bottom\ \ -fill\ x\ \ \ \ -expand\ no\n\ \ \ \ pack\ .yyyyaxis\ -in\ .listlistbox\ -side\ right\ \ \ -fill\ y\ \ \ \ -expand\ no\n\ \ \ \ pack\ .labellabel\ \ -in\ .listlistbox\ -side\ top\ \ \ \ \ -fill\ both\ -expand\ yes\n\ \ \ \ frame\ .buttonbuttonx\n\ \ \ \ pack\ .buttonbuttonx\ -fill\ x\n\ \ \ \ button\ .caster\ -text\ Cast_Bones\ -command\ \{bonereadxx\ 1\ \;castfortune\;\}\n\ \ \ \ button\ .coinster\ -text\ Coin_Toss\ -command\ \{bonereadxx\ 2\;castfortune\;\}\n\ \ \ \ \n\ \ \ \ button\ .done\ -text\ Exit\ -command\ exit\n\ \ \ \ pack\ .caster\ .coinster\ .done\ -in\ .buttonbuttonx\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -side\ top\ -fill\ x\n\ \ \ \ bind\ .labellabel\ <Double-1>\ clickclicklistbox\n\ \ \ \ \n\ \ \ \ pack\ \ \[\ label\ .ww\ -text\ \"Iching\ holding\ tank\ \"\ -bg\ \$colorground\]\n\ \ \ \ pack\ \[\ text\ .wxxccc\ -width\ 80\ -height\ 3\ -bg\ beige\ \]\n\ \ \ \ \n\ \ \ \ focus\ .wxxccc\ \ \ \ \ \ \ \ \ \ \ \;#\ allow\ keyboard\ input\n\ \ \ \ \n\ \ \ \ .wxxccc\ insert\ end\ \ \"xxx\ starter\ xxx\ \ \"\;\n\ \ \ \ \n\ \ \ \ scrollbar\ .scr\ -orient\ vertical\ -command\ \".can\ yview\"\n\ \ \ \ canvas\ .can\ -yscrollcommand\ \".scr\ set\"\ -width\ 240\ -bg\ \$colorground\n\ \ \ \ \n\ \ \ \ pack\ .can\ -fill\ both\ -expand\ 1\ -side\ left\n\ \ \ \ pack\ .scr\ -fill\ y\ -expand\ 0\ -side\ left\n\ \ \ \ \n\ \ \ \ set\ width\ 50\n\ \ \ \ set\ height\ 50\n\ \ \ \ set\ w\ \".can\"\n\ \ \ \ set\ x\ 100\n\ \ \ \ set\ y\ 100\n\ \ \ \ \n\ \ \ \ set\ dx\ 50\n\ \ \ \ set\ dy\ 30\n\ \ \ \ \n\ \ \ \ set\ colors\ \{white\ black\ \}\n\ \ \ \ set\ color\ 0\n\ \ \ \ #suchenwirth_subroutine\;\}\n\ \ \ \ proc\ lpick\ L\ \{lindex\ \$L\ \[expr\ \{int(rand()*\[llength\ \$L\])\}\ \]\;\}\n\ \ \ \ #\ utilities\n\ \ \ \ proc\ plainsub\ \{text\ item\ replacewith\}\ \{\n\ \ \ \ \ \ \ \ set\ text\ \[string\ map\ \[list\ \$item\ \$replacewith\]\ \$text\]\n\ \ \ \ \}\n\ \ \ \ proc\ %+\ \{a\ \ \}\ \{return\ \[string\ toupper\ \$a\]\;\ #%+\ tree\ >TREE\ \}\n\ \ \ \ proc\ %-\ \{a\ \ \}\ \{return\ \[string\ tolower\ \$a\]\;\ #%+\ Tree\ >tree\ \ \}\n\ \ \ \ proc\ %++\ \{a\ b\}\ \{return\ \$a\$b\;#%+*\ tree\ root\ \ >treeroot\ \}\n\ \ \ \ proc\ %--\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%--\ 5\ 7>5\ \}\n\ \ \ \ proc\ %%\ \{a\ b\}\ \{regsub\ -all\ \$b\ \$a\ \"\"\;#%%\ tree\ root\ \ >tree\ \}\n\ \ \ \ proc\ %1\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%1\ tree\ root>tree\ \}\n\ \ \ \ proc\ %2\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%2\ tree\ root>tree\ \}\n\ \ \ \ proc\ %3\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;regsub\ \$b\ \$a\ \"\"\ a\;regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%3\ tree\ root>tree\}\n\ \ \ \ proc\ %2x\ \ \{a\}\ \{return\ \$a\$a\;#%2x\ tree>treetree\}\n\ \ \ \ proc\ %3x\ \ \{a\}\ \{return\ \$a\$a\$a\;#%3x\ tree>treetreetree\}\n\ \ \ \ proc\ %4x\ \ \{a\}\ \{return\ \"\$a,\$a,\$a\"\;#%5x\ tree>tree,tree,tree\ \}\n\ \ \ \ proc\ %5x\ \ \{a\}\ \{return\ \"\$a\ \$a\ \$a\"\;#%5x\ tree>tree\ tree\ tree\ \}\n\ \ \ \ proc\ repeat\ \{n\ body\}\ \{while\ \{\$n\}\ \{incr\ n\ -1\;\ uplevel\ \$body\}\}\n\ \ \ \ proc\ random\ n\ \{expr\ \{round(\$n*rand())\}\}\n\ \ \ \ proc\ whitelist\ \{a\}\ \{return\ \[lreplace\ \$a\ 0\ -1\]\;#take\ string,return\ list\ without\ blanks\}\n\ \ \ \ set\ k\ \[split\ \{abcdefghijklmnopqrstuvwxyz\}\ \{\}\]\n\ \ \ \ proc\ average\ L\ \{expr\ (\[join\ \$L\ +\])/\[llength\ \$L\].\}\n\ \ \ \ proc\ srevert\ s\ \{\n\ \ \ \ \ \ \ \ set\ l\ \[string\ length\ \$s\]\n\ \ \ \ \ \ \ \ set\ res\ \"\"\n\ \ \ \ \ \ \ \ while\ \{\$l\}\ \{append\ res\ \[string\ index\ \$s\ \[incr\ l\ -1\]\]\}\n\ \ \ \ \ \ \ \ set\ res\n\ \ \ \ \}\;#\ RS,\n\ \ \ \ \n\ \ \ \ proc\ lreverse\ L\ \{\n\ \ \ \ \ \ \ \ set\ res\ \{\}\n\ \ \ \ \ \ \ \ set\ i\ \[llength\ \$L\]\n\ \ \ \ \ \ \ \ #while\ \{\[incr\ i\ -1\]>=0\}\ \{lappend\ res\ \[lindex\ \$L\ \$i\]\}\n\ \ \ \ \ \ \ \ while\ \{\$i\}\ \{lappend\ res\ \[lindex\ \$L\ \[incr\ i\ -1\]\]\}\ \;#\ rmax\n\ \ \ \ \ \ \ \ set\ res\n\ \ \ \ \}\ \;#\ RS,\ tuned\ 10%\ faster\ by\ \[rmax\]\n\ \ \ \ \n\ \ \ \ proc\ sumoflist\ \ L\ \{expr\ \[join\ \[split\ \$L\ \"\"\]\ +\]+0\}\ \;#\ RS\n\ \ \ \ proc\ convertbase2to10\ \{jip\}\ \{\n\ \ \ \ \ \ \ \ set\ l\ \[split\ \$jip\ \"\"\]\n\ \ \ \ \ \ \ \ set\ t\ 0\;\ set\ e\ 0\;\n\ \ \ \ \ \ \ \ foreach\ n\ \$l\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ exp\ \[\ expr\ int(pow(2,\$e))\]\;\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ t\ \[\ expr\ \$n\ *\ \$exp\ \ \]\ \;\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ e\;\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$t\}\n\ \ \ \ proc\ kvsearch\ \{kvlist\ item\}\ \{\n\ \ \ \ \ \ \ \ set\ pos\ \[lsearch\ \$kvlist\ \$item\]\n\ \ \ \ \ \ \ \ if\ \{\$pos\ !=\ -1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lindex\ \$kvlist\ \[expr\ \{\$pos+1-2*(\$pos%2)\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\ \;#\ RS\n\ \ \ \ #\ end\ utilities\n\ \ \ \ #start\ iching\ data\n\ \ \ \ set\ bookvalue\ \ \[\ list\ \ 1\ \ 63\ \ 43\ \ 62\ \ 14\ \ 61\ \ 34\ \ 60\ \ 9\ \ 59\ \ 5\ 58\ 26\ \ 57\ \ 11\ \ 56\ \ 10\ \ 55\ \ 58\ \ 54\ \ 38\ \ 53\ \ 54\ \ 52\ \ 61\ \ 51\ 60\ \ 50\ 41\ \ 49\ \ 19\ \ 48\ 13\ \ 47\ \ 49\ \ 46\ \ 30\ \ 45\ \ 55\ \ 44\ \ 37\ \ 43\ \ 63\ \ 42\ \ 22\ \ 41\ \ 36\ \ 40\ \ 25\ \ 39\ \ 17\ \ 38\ \ 21\ \ 37\ \ 51\ \ 36\ \ 42\ \ 35\ \ 3\ \ 34\ \ 27\ \ 33\ \ 24\ \ 32\ \ 44\ \ 31\ \ 28\ \ 30\ \ 50\ \ 29\ \ 32\ \ 28\ \ 57\ \ 27\ \ 48\ \ 26\ \ 18\ \ 25\ \ 46\ \ 24\ \ 6\ \ 23\ \ 47\ \ 22\ \ 64\ \ 21\ \ 40\ \ 20\ \ 59\ \ 19\ \ 29\ \ 18\ 4\ 17\ \ 7\ \ 16\ \ 33\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ 10\ \ 52\ \ 9\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ \ 10\ 52\ \ 9\ \ 15\ 8\ 12\ \ \ 7\ \ 45\ \ 6\ \ 35\ \ 5\ \ 16\ \ 4\ \ 20\ \ 3\ \ \ 23\ \ 1\ \ 2\ \ 0\ 8\ 2\ \]\n\ \ \ \ set\ bookvalue2\ \ \[\ list\ 9999\ 1\ \ 63\ \ 43\ \ 62\ \ 14\ \ 61\ \ 34\ \ 60\ \ 9\ \ 59\ \ 5\ 58\ 26\ \ 57\ \ 11\ \ 56\ \ 10\ \ 55\ \ 58\ \ 54\ \ 38\ \ 53\ \ 54\ \ 52\ \ 61\ \ 51\ 60\ \ 50\ 41\ \ 49\ \ 19\ 48\ \ 13\ \ 47\ \ 49\ \ 46\ \ 30\ \ 45\ \ 55\ \ 44\ \ 37\ \ 43\ \ 63\ \ 42\ \ 22\ \ 41\ \ 36\ \ 40\ \ 25\ \ 39\ \ 17\ \ 38\ \ 21\ \ 37\ \ 51\ \ 36\ \ 42\ \ 35\ \ 3\ \ 34\ \ 27\ \ 33\ \ 24\ \ 32\ \ 44\ \ 31\ \ 28\ \ 30\ \ 50\ \ 29\ \ 32\ \ 28\ \ 57\ \ 27\ \ 48\ \ 26\ \ 18\ \ 25\ \ 46\ \ 24\ \ 6\ \ 23\ \ 47\ \ 22\ \ 64\ \ 21\ \ 40\ \ 20\ \ 59\ \ 19\ \ 29\ \ 18\ 4\ 17\ \ 7\ \ 16\ \ 33\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ 10\ \ 52\ \ 9\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ \ 10\ 52\ \ 9\ \ 15\ 8\ 12\ \ \ 7\ \ 45\ \ 6\ \ 35\ \ 5\ \ 16\ \ 4\ \ 20\ \ 3\ \ \ 23\ \ 1\ \ 2\ \ 0\ 8\ 2\ \]\n\ \ \ \ if\ 0\ \{\ iching\ hexagrams\ and\ trigrams\ \}\n\ \ \ \ if\ 0\ \{\ Little\ API\ style\ database\ \}\n\ \ \ \ \n\ \ \ \ set\ \ chartbamboo\ \{\ \"\ list\n\ \ \ \ \ \ \ \ +\ hexagram_1\ :\ pinyin\ Qian\ wade\ Ch'ien\ english\ \{The\ Creative\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_2\ :\ pinyin\ Kun\ wade\ \ K'un\ english\ \{The\ Receptive\}\n\ \ \ \ \ \ \ \ +\ hexagram_3\ :\ pinyin\ Zhun\ wade\ Chun\ english\ \{\ Difficulty\ at\ the\ Beginning\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_4\ :\ pinyin\ Meng\ wade\ Mêng\ english\ \{Youthful\ Folly\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_5\ :\ pinyin\ Xu\ wade\ Hsü\ english\ \{Waiting\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_6\ :\ pinyin\ \ Song\ wade\ Sung\ english\ \{Conflict\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_7\ :\ pinyin\ \ Shi\ wade\ Shih\ english\ \{The\ Army\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_8\ :\ pinyin\ \ Bi\ wade\ Pi\ english\ \{Holding\ Together\}\n\ \ \ \ \ \ \ \ +\ hexagram_9\ :\ pinyin\ \ Xiaoxu\ wade\ Hsiao\ Ch'u\ english\ \{The\ Taming\ Power\ of\ the\ Small\}\n\ \ \ \ \ \ \ \ +\ hexagram_10\ :\ pinyin\ Lü\ wade\ Lü\ english\ \{Treading\}\n\ \ \ \ \ \ \ \ +\ hexagram_11\ :\ pinyin\ Tai\ wade\ T'ai\ english\ \{Peace\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_12\ :\ pinyin\ Pi\ wade\ P'i\ english\ \{Standstill\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_13\ :\ pinyin\ Tongren\ wade\ \{T'ung\ Jên\}\ english\ \{Fellowship\ with\ Men\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_14\ :\ pinyin\ Dayou\ wade\ \{\ Ta\ Yu\ \}\ english\ \{Possession\ in\ Great\ Measure\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_15\ :\ pinyin\ Qian\ wade\ Ch'ien\ english\ \{Modesty\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_16\ :\ pinyin\ Yu\ wade\ Yü\ english\ \{Enthusiasm\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_17\ :\ pinyin\ Sui\ wade\ Sui\ english\ \{Following\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_18\ :\ pinyin\ Gu\ wade\ Ku\ english\ \{Work\ on\ What\ Has\ Been\ Spoiled\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_19\ :\ pinyin\ Lin\ wade\ Lin\ english\ \{Approach\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_20\ :\ pinyin\ Guan\ wade\ Kuan\ english\ \{Contemplation\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_21\ :\ pinyin\ Shike\ wade\ \{Shih\ Ho\ \}\ english\ \{Biting\ Through\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_22\ :\ pinyin\ Bi\ wade\ Pi\ english\ \{Grace\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_23\ :\ pinyin\ Bo\ wade\ Po\ english\ \{Splitting\ Apart\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_24\ :\ pinyin\ Fu\ wade\ Fu\ english\ \{Return\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_25\ :\ pinyin\ Wuwang\ wade\ \{\ Wu\ Wang\ \}english\ \{Innocence\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_26\ :\ pinyin\ Daxu\ wade\ \{\ Ta\ Ch'u\ \}\ english\ \{The\ Taming\ Power\ of\ the\ Great\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_27\ :\ pinyin\ Yi\ wade\ I\ english\ \{The\ Corners\ of\ the\ Mouth\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_28\ :\ pinyin\ Daguo\ wade\ \{\ Ta\ Kuo\ \}\ english\ \{Preponderance\ of\ the\ Great\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_29\ :\ pinyin\ Kan\ wade\ K'an\ english\ \{The\ Abysmal\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_30\ :\ pinyin\ Li\ wade\ Li\ english\ \{The\ Clinging\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_31\ :\ pinyin\ Xian\ wade\ \ Hsien\ english\ \{Influence\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_32\ :\ pinyin\ Heng\ wade\ \ Hêng\ english\ \{Duration\}\n\ \ \ \ \ \ \ \ +\ hexagram_33\ :\ pinyin\ Dun\ \ wade\ \ Tun\ english\ \{Retreat\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_34\ :\ pinyin\ Dazhuang\ wade\ \{\ Ta\ Chuang\ \}\ english\ \{The\ Power\ of\ the\ Great\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_35\ :\ pinyin\ Jin\ wade\ Chin\ english\ \{Progress\}\n\ \ \ \ \ \ \ \ +\ hexagram_36\ :\ pinyin\ Mingyi\ wade\ \{\ Ming\ I\ \}\ english\ \{Darkening\ of\ the\ Light\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_37\ :\ pinyin\ Jiaren\ wade\ Chia\ Jên\ english\ \{\ The\ Family\}\n\ \ \ \ \ \ \ \ +\ hexagram_38\ :\ pinyin\ Kui\ wade\ K'uei\ english\ \{Opposition\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_39\ :\ pinyin\ Jian\ wade\ Chien\ english\ \{Obstruction\}\n\ \ \ \ \ \ \ \ +\ hexagram_40\ :\ pinyin\ \ Xie\ wade\ Hsieh\ english\ \{Deliverance\}\n\ \ \ \ \ \ \ \ +\ hexagram_41\ :\ pinyin\ Sun\ \ wade\ Sun\ english\ \{Decrease\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_42\ :\ pinyin\ Yi\ \ wade\ I\ english\ \{Increase\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_43\ :\ pinyin\ Guai\ wade\ Kuai\ english\ \{Break-through\}\n\ \ \ \ \ \ \ \ +\ hexagram_44\ :\ pinyin\ Gou\ wade\ Kou\ english\ \{Coming\ to\ Meet\}\n\ \ \ \ \ \ \ \ +\ hexagram_45\ :\ pinyin\ Cui\ wade\ Ts'ui\ english\ \{Gathering\ Together\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_46\ :\ pinyin\ Sheng\ wade\ Shêng\ english\ \{Pushing\ Upward\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_47\ :\ pinyin\ Kun\ wade\ K'un\ english\ \{Oppression\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_48\ :\ pinyin\ Jing\ wade\ Ching\ english\ \{The\ Well\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_49\ :\ pinyin\ Ge\ wade\ Ko\ english\ \{Revolution\}\n\ \ \ \ \ \ \ \ +\ hexagram_50\ :\ pinyin\ Ding\ wade\ Ting\ english\ \{The\ Caldron\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_51\ :\ pinyin\ Zhen\ wade\ Chên\ english\ \{The\ Arousing\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_52\ :\ pinyin\ Gen\ wade\ Kên\ english\ \{Keeping\ Still\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_53\ :\ pinyin\ Jian\ wade\ Chien\ english\ \{Development\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_54\ :\ pinyin\ Guimei\ wade\ \{Kuei\ Mei\}\ english\ \{The\ Marrying\ Maiden\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_55\ :\ pinyin\ Feng\ wade\ Fêng\ english\ \{Abundance\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_56\ :\ pinyin\ Lü\ wade\ Lü\ english\ \{The\ Wanderer\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_57\ :\ pinyin\ Xun\ wade\ Sun\ english\ \{The\ Gentle\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_58\ :\ pinyin\ Dui\ wade\ Tui\ english\ \{The\ Joyous\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_59\ :\ pinyin\ Huan\ wade\ Huan\ english\ \{\ Dispersion\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_60\ :\ pinyin\ Jie\ wade\ Chieh\ english\ \{Limitation\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_61\ :\ pinyin\ Zhongfu\ wade\ \{Chung\ Fu\}\ english\ \{InnerTruth\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_62\ :\ pinyin\ Xiaoguo\ wade\ \{\ Hsiao\ Kuo\}\ english\ \{Preponderance\ of\ the\ Small\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_63\ :\ pinyin\ Jiji\ wade\ \{\ Chi\ Chi\ \}\ english\ \{After\ Completion\}\n\ \ \ \ \ \ \ \ +\ hexagram_64\ :\ pinyin\ Weiji\ wade\ \{\ Wei\ Chi\ \}\ english\ \{Before\ Completion\ \}\n\ \ \ \ \ \ \ \ \"\ \ \}\n\ \ \ \ proc\ plainsub\ \{text\ item\ replacewith\}\ \{\n\ \ \ \ \ \ \ \ set\ text\ \[string\ map\ \[list\ \$item\ \$replacewith\]\ \$text\]\ \}\n\ \ \ \ foreach\ piece\ \{\ +\ :\ \\\{\ \\\}\ \}\ \ \{\n\ \ \ \ \ \ \ \ set\ \ chartbamboo\ \[\ plainsub\ \$chartbamboo\ \$piece\ \"*\"\ \]\n\ \ \ \ \}\n\ \ \ \ \n\ \ \ \ set\ reading\ \[\ list\ \[\ split\ \$chartbamboo\ \"\ \"\ \]\]\n\ \ \ \ \n\ \ \ \ #end\ iching\ data\n\ \ \ \ proc\ binaryexchange\ \{gualisting\}\ \{\n\ \ \ \ \ \ \ \ #\ converts\ gualisting\ as\ a\ list\n\ \ \ \ \ \ \ \ #\ to\ binary\ &\ decimal\ numbers.\n\ \ \ \ \ \ \ \ global\ dx\ dy\ colors\ color\n\ \ \ \ \ \ \ \ global\ guabinary\ guadecimal\ guatransform\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ whitelist\ \$gualisting\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ join\ \[\ split\ \$guabinary\ \"\ \"\]\]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 6\ 0\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 7\ 1\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 8\ 0\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 9\ 1\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ \"\ \"\ \"\"\ \]\;\n\ \ \ \ \ \ \ \ return\ \$guabinary\;\n\ \ \ \ \}\n\ \ \ \ proc\ second_hexagram_compute\ \{gualisting\ \}\ \{\n\ \ \ \ \ \ \ \ #\ subroutine\ under\ test\n\ \ \ \ \ \ \ \ global\ bookvalue\ second_hexagram\n\ \ \ \ \ \ \ \ #set\ gualisting\ \[\ lreverse\ \$gualisting\]\;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \[\ list\ \]\;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \ \[\ join\ \$gualisting\ \]\ \;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \[\ plainsub\ \$second_hexagram\ 6\ 7\ \]\;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \ \[\ plainsub\ \$second_hexagram\ 9\ 6\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ binaryexchange\ \$second_hexagram\ \]\;\n\ \ \ \ \ \ \ \ set\ decimalout\ \[\ convertbase2to10\ \$guabinary\ \]\;\n\ \ \ \ \ \ \ \ set\ bookgua\ \[\ kvsearch\ \$bookvalue\ \$decimalout\ \]\;\n\ \ \ \ \ \ \ \ return\ \$bookgua\;\n\ \ \ \ \}\n\ \ \ \ proc\ bonereadxx\ \{coinsread\}\ \{\n\ \ \ \ \ \ \ \ global\ dx\ dy\ colors\ color\ gualisting\ reading\n\ \ \ \ \ \ \ \ global\ bookvalue\ bookvalue2\ second_hexagram\n\ \ \ \ \ \ \ \ set\ dj\ 1\;\n\ \ \ \ \ \ \ \ set\ gualisting\ \[list\ \]\;\n\ \ \ \ \ \ \ \ if\ \{\ \$coinsread\ ==\ 1\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\}\ \{\$j<6\}\ \{incr\ j\ \$dj\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone1\ \[lpick\ \{3\ 3\ 3\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone2\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone3\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bonereading\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ wow\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ gualisting\ \$wow\;\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ if\ \{\ \$coinsread\ ==\ 2\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\}\ \{\$j<6\}\ \{incr\ j\ \$dj\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone1\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone2\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone3\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bonereading\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ wow\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ gualisting\ \$wow\;\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ #set\ guabinary\ \[\ list\ 1\ 0\ 1\ 1\ 1\ si\ tiene\ problema\ \]\n\ \ \ \ \ \ \ \ set\ gualisting\ \[\ lreverse\ \$gualisting\]\;\n\ \ \ \ \ \ \ \ #\ reading\ hexagram\ lines\ top\ down,\n\ \ \ \ \ \ \ \ #\ opposed\ to\ reverse(down\ top)\n\ \ \ \ \ \ \ \ #\ give\ different\ binary\ values\n\ \ \ \ \ \ \ \ #\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ binaryexchange\ \$gualisting\ \]\;\n\ \ \ \ \ \ \ \ set\ decimalout\ \[\ convertbase2to10\ \$guabinary\ \]\;\n\ \ \ \ \ \ \ \ set\ bookgua\ \[\ kvsearch\ \$bookvalue2\ \$decimalout\ \]\;\n\ \ \ \ \ \ \ \ set\ second_hexa\ \[\ second_hexagram_compute\ \$gualisting\ \]\;\n\ \ \ \ \ \ \ \ .wxxccc\ delete\ 1.0\ end\;\n\ \ \ \ \ \ \ \ set\ outoutfoulspirit\ \"\ last\ bone\ is\ \$wow\ .gua\ listing\ is\ \ \ \$gualisting\ &&\ binary\ \$guabinary\ &&\ decimal\ \$decimalout\ &&Iching_gua_#\ \$bookgua\ &&\ \ test\ 2nd\ hex.\ \$second_hexagram\ &&\ 2nd\ h.\ test\ \$second_hexa\ &&\ \$second_hexagram\n\ \ \ \ \ \ \ \ \$reading\ \"\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ .wxxccc\ insert\ end\ \$outoutfoulspirit\ \ \ \ \ \ \}\n\ \ \ \ \n\ \ \ \ proc\ castfortune\ \{\}\ \{\n\ \ \ \ \ \ \ \ global\ dx\ dy\ colors\ color\ gualisting\ second_hexagram\n\ \ \ \ \ \ \ \ set\ colorx\ black\;\n\ \ \ \ \ \ \ \ for\ \{set\ i\ 0\;\ set\ y\ 0\}\ \{\$i<6\}\ \{incr\ i\;\ incr\ y\ \$dy\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ brown\;\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\;\ set\ x\ 0\}\ \{\$j<3\}\ \{incr\ j\;\ incr\ x\ \$dx\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ brown\;\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \$j\ ==\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 6\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 7\}\ \{set\ colorx\ brown\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 8\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 9\}\ \{set\ colorx\ brown\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .can\ create\ rectangle\ \$x\ \$y\ \[expr\ \{\$x+\$dx\}\]\ \[expr\ \{\$y+\$dy\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ \$colorx\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \}\}\n\ \ \ \ \ \ \ \ set\ dx\ 50\n\ \ \ \ \ \ \ \ set\ dy\ 30\n\ \ \ \ \ \ \ \ set\ colorx\ blue\;\n\ \ \ \ \ \ \ \ for\ \{set\ i\ 0\;\ set\ y\ 0\}\ \{\$i<6\}\ \{incr\ i\;\ incr\ y\ \$dy\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ blue\;\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\;\ set\ x\ 0\}\ \{\$j<3\}\ \{incr\ j\;\ incr\ x\ \$dx\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ blue\;\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \$j\ ==\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 6\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 7\}\ \{set\ colorx\ blue\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 8\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 9\}\ \{set\ colorx\ blue\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .can\ create\ rectangle\ \[expr\ \$x\ +\ 180\]\ \$y\ \[expr\ \{\[expr\ \$x\ +180\ \]+\$dx\}\]\ \[expr\ \{\$y+\$dy\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ \$colorx\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \}\}\n\ \ \ \ \ \ \ \ \n\ \ \ \ \}\n\ \ \ \ \n\ \ \ \ xskipskipdirectory\ \$env(HOME)\n\ \ \ \n\ \ \ \ \n\n======\n----\n**Appendix\ Tables**\n======\n\ if\ 0\ \{\ iching\ hexagrams\ and\ trigrams\ \}\n|1.\ \ |Qian\ \ \ \ \ |Ch'ien,\ The\ Creative|\n|2.\ \ |Kun\ \ \ \ \ \ |K'un,\ The\ Receptive|\n|3.\ \ |Zhun\ \ \ \ \ |Chun,\ Difficulty\ at\ the\ Beginning|\n|4.\ \ |Meng\ \ \ \ \ |Mêng,\ Youthful\ Folly|\n|5.\ \ |Xu\ \ \ \ \ \ \ |Hsü,\ Waiting|\n|6.\ \ |Song\ \ \ \ \ |Sung,\ Conflict|\n|7.\ \ |Shi\ \ \ \ \ \ |Shih,\ The\ Army|\n|8.\ \ |Bi\ \ \ \ \ \ \ |Pi,\ Holding\ Together|\n|9.\ \ |Xiaoxu\ \ \ |Hsiao\ Ch'u,\ The\ Taming\ Power\ of\ the\ Small|\n|10.\ \ |Lü\ \ \ \ \ \ \ |Lü,\ Treading|\n|11.\ \ |Tai\ \ \ \ \ \ |T'ai,\ Peace|\n|12.\ \ |Pi\ \ \ \ \ \ \ |P'i,\ Standstill|\n|13.\ \ |Tongren\ \ |T'ung\ Jên,\ Fellowship\ with\ Men|\n|14.\ \ |Dayou\ \ \ \ |Ta\ Yu,\ Possession\ in\ Great\ Measure|\n|15.\ \ |Qian\ \ \ \ \ |Ch'ien,\ Modesty|\n|16.\ \ |Yu\ \ \ \ \ \ \ |Yü,\ Enthusiasm|\n|17.\ \ |Sui\ \ \ \ \ \ |Sui,\ Following|\n|18.\ \ |Gu\ \ \ \ \ \ \ |Ku,\ Work\ on\ What\ Has\ Been\ Spoiled|\n|19.\ \ |Lin\ \ \ \ \ \ |Lin,\ Approach|\n|20.\ \ |Guan\ \ \ \ \ |Kuan,\ Contemplation|\n|21.\ \ |Shike\ \ \ \ |Shih\ Ho,\ Biting\ Through|\n|22.\ \ |Bi\ \ \ \ \ \ \ |Pi,\ Grace|\n|23.\ \ |Bo\ \ \ \ \ \ \ |Po,\ Splitting\ Apart|\n|24.\ \ |Fu\ \ \ \ \ \ \ |Fu,\ Return|\n|25.\ \ |Wuwang\ \ \ |Wu\ Wang,\ Innocence|\n|26.\ \ |Daxu\ \ \ \ \ |Ta\ Ch'u,\ The\ Taming\ Power\ of\ the\ Great|\n|27.\ \ |Yi\ \ \ \ \ \ \ |I,\ The\ Corners\ of\ the\ Mouth|\n|28.\ \ |Daguo\ \ \ \ |Ta\ Kuo,\ Preponderance\ of\ the\ Great|\n|29.\ \ |Kan\ \ \ \ \ \ |K'an,\ The\ Abysmal|\n|30.\ \ |Li\ \ \ \ \ \ \ |Li,\ The\ Clinging|\n|31.\ \ |Xian\ \ \ \ \ |Hsien,\ Influence|\n|32.\ \ |Heng\ \ \ \ \ |Hêng,\ Duration|\n|33.\ \ |Dun\ \ \ \ \ \ |Tun,\ Retreat|\n|34.\ \ |Dazhuang\ |Ta\ Chuang,\ The\ Power\ of\ the\ Great|\n|35.\ \ |Jin\ \ \ \ \ \ |Chin,\ Progress|\n|36.\ \ |Mingyi\ \ \ |Ming\ I,\ Darkening\ of\ the\ Light|\n|37.\ \ |Jiaren\ \ \ |Chia\ Jên,\ The\ Family|\n|38.\ \ |Kui\ \ \ \ \ \ |K'uei,\ Opposition|\n|39.\ \ |Jian\ \ \ \ \ |Chien,\ Obstruction|\n|40.\ \ |Xie\ \ \ \ \ \ |Hsieh,\ Deliverance|\n|41.\ \ |Sun\ \ \ \ \ \ |Sun,\ Decrease|\n|42.\ \ |Yi\ \ \ \ \ \ \ |I,\ Increase|\n|43.\ \ |Guai\ \ \ \ \ |Kuai,\ Break-through|\n|44.\ \ |Gou\ \ \ \ \ \ |Kou,\ Coming\ to\ Meet|\n|45.\ \ |Cui\ \ \ \ \ \ |Ts'ui,\ Gathering\ Together|\n|46.\ \ |Sheng\ \ \ \ |Shêng,\ Pushing\ Upward|\n|47.\ \ |Kun\ \ \ \ \ \ |K'un,\ Oppression|\n|48.\ \ |Jing\ \ \ \ \ |Ching,\ The\ Well|\n|49.\ \ |Ge\ \ \ \ \ \ \ |Ko,\ Revolution|\n|50.\ \ |Ding\ \ \ \ \ |Ting,\ The\ Caldron|\n|51.\ \ |Zhen\ \ \ \ \ |Chên,\ The\ Arousing|\n|52.\ \ |Gen\ \ \ \ \ \ |Kên,\ Keeping\ Still|\n|53.\ \ |Jian\ \ \ \ \ |Chien,\ Development|\n|54.\ \ |Guimei\ \ \ |Kuei\ Mei,\ The\ Marrying\ Maiden|\n|55.\ \ |Feng\ \ \ \ \ |Fêng,\ Abundance|\n|56.\ \ |Lü\ \ \ \ \ \ \ |Lü,\ The\ Wanderer|\n|57.\ \ |Xun\ \ \ \ \ \ |Sun,\ The\ Gentle|\n|58.\ \ |Dui\ \ \ \ \ \ |Tui,\ The\ Joyous|\n|59.\ \ |Huan\ \ \ \ \ |Huan,\ Dispersion|\n|60.\ \ |Jie\ \ \ \ \ \ |Chieh,\ Limitation|\n|61.\ \ |Zhongfu\ \ |Chung\ Fu,\ Inner\ Truth|\n|62.\ \ |Xiaoguo\ \ |Hsiao\ Kuo,\ Preponderance\ of\ the\ Small|\n|63.\ \ |Jiji\ \ \ \ \ |Chi\ Chi,\ After\ Completion|\n|64.\ \ |Weiji\ \ \ \ |Wei\ Chi,\ Before\ Completion|\n======\n**The\ names\ of\ the\ trigrams**\n======\n|I\ \ \ |Ching\ \ \ \ |Trigram\ Name\ |\ Translations|\n|\ \ \ \ |Pinyin\ \ \ |Wade-Giles\ \ \ |\ (Wilhelm/Baynes)\ associations|\n|1.\ \ |Qian\ \ \ \ \ |Ch'ien\ \ \ \ \ \ \ |the\ creative,\ heaven,\ Father,northwest,head,lungs|\n|2.\ \ |Kun\ \ \ \ \ \ |K'un\ \ \ \ \ \ \ \ \ |the\ receptive,earth,Mother,southwest,abdomen,reproductive_organs|\n|3.\ \ |Zhen\ \ \ \ \ |Chên\ \ \ \ \ \ \ \ \ |the\ arousing,\ thunder,Eldest_Son,east,throat|\n|4.\ \ |Kan\ \ \ \ \ \ |K'an\ \ \ \ \ \ \ \ \ |the\ abysmal,water,Middle_Son,north,liver,kidneys,inner_ear|\n|5.\ \ |Gen\ \ \ \ \ \ |Kên\ \ \ \ \ \ \ \ \ \ |keeping\ still,\ mountain,Youngest_Son,northeast,hands,spine,bones|\n|6.\ \ |Xun\ \ \ \ \ \ |Sun\ \ \ \ \ \ \ \ \ \ |the\ gentle,\ wind,\ Eldest\ Daughter,southeast,hips,buttocks|\n|7.\ \ |Li\ \ \ \ \ \ \ |Li\ \ \ \ \ \ \ \ \ \ \ |the\ clinging,\ flame,Middle_Daughter,south,eyes,heart|\n|8.\ \ |Dui\ \ \ \ \ \ |Tui\ \ \ \ \ \ \ \ \ \ |the\ joyous,\ lake,Youngest_Daughter,west,mouth\ \}|\n\n----\n**Comments\ Section**\nPlease\ place\ any\ comments\ here,\ Thanks.\n\[gold\]\ Change:Redundant\ procedure\ ?\ deleted.\ \ \ \ \n\n\[LV\]\ slightly\ reformatted\ code\ to\ some\ level\ of\ consistency,\ added\ a\ few\nbraces\ around\ expr\ arguments,\ and\ removed\ a\ redundant\ proc\ definition.\n\n\[gold\]\ Change\ 13Mar2007:omitted\ **(exp)\ in\ expr\ for\ base2,\ TCL8.5&>.\n\nCJL\ thinks\ that\ following\ the\ guidelines\ \[http://wiki.tcl.tk/6\]\ would\ make\nthis\ page\ much\ more\ readable,\ and\ give\ browsers\ a\ chance\ to\ flow\ the\nformatting\n\n<<discussion>>\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n<<categories>>\ Numerical\ Analysis\ |\ Toys\ |\ Calculator\ |\ Mathematics|\ Example regexp2} CALL {my render Iching_Fortunes **Iching_Fortunes**\n\nThis\ page\ is\ under\ development.\ Comments\ are\ welcome,\ but\ please\ load\ any\ comments\ in\ the\ comments\ section\ at\ the\ bottom\ of\ the\ page.\ Please\ include\ your\ wiki\ MONIKER\ \ in\ your\ comment\ with\ the\ same\ courtesy\ that\ I\ will\ give\ you.\ Its\ very\ hard\ to\ reply\ intelligibly\ without\ some\ background\ of\ the\ correspondent.\ Thanks,\[gold\]\n----\n\n<<TOC>>\n**Introduction**\n\nThe\ Iching\ is\ the\ ancient\ fortune\ telling\ book\ of\ China.\ The\ Iching\nliterature\ mentions\ various\ methods\ for\ casting\ fortune\ patterns\ of\ Iching.\nThe\ various\ methods\ include\ hot\ ironing\ of\ turtle\ shells\ (-t.),\nmanipulations\ of\ yarrow\ sticks,\ flipping\ coins,\ throwing\ shaman\ bones,\ and\ndice.\ One\ analogy\ from\ North\ America\ is\ a\ shaman\ throwing\ or\ shuffling\ stick\ndice.\n\n----\n\nI\ made\ three\ stick\ dice\ for\ Iching\ by\ cutting\ a\ dowel\ of\ square\ cross\nsection\ into\ three\ sticks.\ For\ the\ three\ stick\ dice,\ the\ flat\ sides\ are\nmarked\ or\ burned\ with\ 2\ or\ 3\ holes\ alternately.\ Two\ sticks\ are\ marked\ with\n\{3\ 2\ 3\ 2\}\ dots\ on\ the\ sides.\ One\ stick\ is\ marked\ with\ \{3\ 3\ 3\ 2\}\ dots\ on\ the\nsides.\ In\ casting\ such\ three\ dice,\ the\ possible\ sums\ are\ 6,7,8,\ or\ 9.\nFurther,\ the\ stick\ dice\ are\ cast\ six\ times\ to\ obtain\ whole\ lines\ or\ broken\nlines\ in\ a\ pattern\ or\ set\ of\ six\ lines.\ A\ set\ of\ six\ Iching\ lines\ is\ called\na\ gua\ in\ the\ orient\ or\ a\ hexagram\ in\ some\ translations\ of\ the\ Chinese.\n\n----\n\nIn\ the\ Iching\ interpretations,\ casts\ of\ 6\ and\ 8\ are\ broken\ or\ yin\ (female)\nlines,\ while\ casts\ of\ 7\ and\ 9\ are\ whole\ or\ yang\ (male)\ lines.\ The\ casts\ are\nrecorded\ by\ pencil\ with\ the\ first\ line\ at\ bottom\ and\ marking\ up\ the\ column.\nIt\ is\ possible\ to\ record\ the\ numbers\ from\ the\ casts\ with\ tally\ sticks\ or\nChinese\ counting\ rods,\ which\ are\ somewhat\ reminiscent\ of\ the\ Iching\ patterns\nthemselves.\ After\ marking\ the\ original\ pattern\ or\ hexagram,\ sometimes\ a\nsecond\ follow-up\ hexagram\ is\ developed\ by\ swapping\ throws\ of\ 6\ for\ a\ 7\ and\nthrows\ of\ 9\ for\ a\ 6.\ These\ swaps\ effectively\ trade\ a\ broken\ line(6)\ for\ a\nwhole\ line(7)\ and\ a\ whole\ line(9)\ for\ a\ broken\ line(6).\ \ The\ throws\ for\ the\nchanging\ lines\ (6&9)\ may\ not\ always\ be\ come\ out\ in\ the\ first\ hexagram\ or\ its\ncomponent\ lines,\ so\ the\ followup\ hexagram\ may\ not\ exist\ \{under\ consistent\nrules\}.\ If\ the\ first\ hexagram\ is\ interpreted\ on\ a\ line\ by\ line\ basis,\ any\nchanging\ lines(6&9)\ or\ second\ hexagram\ offers\ some\ modification\ or\ discount\non\ the\ interpretation\ of\ the\ first\ hexagram.\n\n----\n\nIn\ developing\ a\ computer\ program\ or\ application,\ it\ is\ helpful\ to\ develop\nanalogs\ for\ the\ individual\ tasks\ of\ the\ application.\ An\ Iching\ application\nwould\ have\ to\ compose,\ beg,\ or\ borrow\ TCL\ procedures\ for\ random\ casts,\ntallies\ of\ scores,\ accounting\ files,\ display\ hexagram\ lines\ on\ a\ screen,\nswapping\ changing\ lines,\ hexagram\ pattern\ recognition\ and\ ranking\ninterpretations.\ In\ fact,\ some\ TCL\ one\ liner\ procedures\ and\ text\ swapping\nroutines\ might\ be\ useful\ as\ utilities\ in\ a\ starter\ application\ program,\nsince\ unruly\ text\ strings\ are\ expected\ in\ the\ Iching.\ \ Casting\ the\ sticks\ or\nbones\ for\ each\ Iching\ line\ is\ analog\ for\ random\ lpick\ subroutine\ below.\nAdding\ the\ top\ sides\ of\ three\ sticks\ and\ throwing\ six\ times\ is\ analog\ for\nthe\ \"for\ 6\ times\"\ statement\ in\ the\ bonereadxx\ procedure\ below.\ In\ the\ West,\nLeibniz\ etc\ recognized\ that\ the\ whole\ and\ broken\ lines\ in\ the\ hexagram\npatterns\ could\ be\ counted\ as\ ones\ and\ zeros,\ respectively\ in\ a\ binary\ number\nsystem.\ For\ example,\ a\ cast\ or\ TCL\ list\ of\ \{\ 6,7,8,9,6,7\ \}\ could\ be\nexpressed\ as\ a\ binary\ number,\ 010101.\ The\ binary\ numbers\ are\ the\ analogs\ for\nthe\ binaryexchange\ subroutine\ below.\ \ For\ computer\ procedures,\ the\ patterns\nare\ effectively\ a\ horizontal\ bar\ code\ of\ 6\ lines.\n\n----\n\nIn\ the\ process\ of\ designing\ the\ basic\ subroutine\ tasks,\ we\ could\ throw\ in\nsome\ switches,\ logic\ chains,\ or\ daisy\ chains\ that\ break\ the\ outset\ rules\ngiven\ above.\ For\ example,\ TCL\ is\ so\ good\ at\ swapping\ lines\ (6&9)\ for\ the\nsecond\ hexagram,\ that\ it\ would\ be\ easy\ to\ put\ a\ switch\ that\ generates\ or\nswaps\ all\ hexagram\ lines\ (6,7,8,&9)\ for\ their\ opposites.\ Also\ from\ some\nscripts\ of\ the\ Chinese\ Chou\ dynasty,\ different\ Iching\ fortune\ methods\ of\nyarrow\ sticks\ or\ coins\ would\ generate\ different\ probabilities\ of\ obtaining\neach\ hexagram\ line.\ Might\ be\ interesting\ to\ have\ a\ back\ door\ in\ the\ program\nto\ check\ (or\ adapt\}\ the\ different\ probabilities\ of\ stick\ or\ coin\ throws.\nSeveral\ authors\ have\ pointed\ out\ that\ a\ few\ of\ the\ hexagrams\ look\ similar\ to\nChinese\ characters\ or\ even\ Mayan\ calendar\ notation.\ Without\ wading\ too\ deep\ninto\ alternate\ realities,\ the\ Iching\ hexagrams\ could\ be\ used\ as\ numerals,\nscript\ alphabet,\ game\ tokens,\ symbol\ recognition\ code,\ or\ maybe\ a\nprogramming\ language\ (like\ Greek\ letters\ for\ APL\ operators).\ \ Such\ rule\nbreaking\ helps\ keep\ the\ finished\ program\ more\ flexible.\n\n\n----\n**Screenshots\ Section**\n\n\[http://img175.imageshack.us/img175/5109/ichinggenerator5ab5.jpg\]\n\[http://farm5.static.flickr.com/4136/4812522943_33727ff8ec.jpg\]\n\[http://farm5.static.flickr.com/4114/4812413403_e697523a46.jpg\]\n\n----\n**References**\n\ \ \ *\ http://en.wikipedia.org/wiki/I_Ching\n\ \ \ *\ http://www.kheper.net/topics/I_Ching/hexagrams.htm\n\ \ \ *\ http://www.peaceloveandme.com/images/trigrams.gif\n\ \ \ *\ http://www.anton-heyboer.org/i_ching/choose.htm\n\ \ \ *\ Search\ on\ google.com\ for\ \"site:www.sipp.org\ ching\ hexagrams\"\n\ \ \ *\ http://www.beatrice.com/TAO.txt\n\ \ \ *\ http://members.aol.com/IChing1/index.html\n\ \ \ *\ http://www.sacred-texts.com/ich/index.htm\n\ \ \ *\ http://www.meritbadge.com/mb/notes/064.htm\n\ \ \ *\ http://home.hccnet.nl/vd.heijdt/sub-division.htm\n\ \ \ *\ Search\ on\ google.com\ for\ \"Navaho\ game\ stick\ dice\"\n\ \ \ *\ Search\ on\ google.com\ for\ \"native\ america\ stick\ dice\"\n\ \ \ *\ http://hearstmuseum.berkeley.edu/../gallery_3_5_5.html\n\ \ \ *\ http://www.biroco.com/yijing/stick.htm\n\ \ \ *\ http://mathcentral.uregina.ca/.../treptau1/game3.html\n\ \ \ *\ Search\ on\ google.com\ for\ \"counting\ rods\"\n\ \ \ *\ Search\ on\ Wikipedia\ for\ \"Bagua\ ching\ trigram\ hexagram\"\n\ \ \ *\ http://www.math.sfu.ca/histmath/China/Beginning/Rod.html\n\ \ \ *\ http://mathforum.org/library/drmath/view/52557.html\n\ \ \ *\ http://members.iimetro.com.au/~lofting/myweb/icmaths.html\n\ \ \ *\ http://www.research.att.com/~njas/sequences/A116586\n\ \ \ *\ http://www.circadianacupuncture.com/CAT/iching.html\n\ \ \ *\ Dirk\ Gently's\ Holistic\ I-ching\ Calculator\ \[http://www.thateden.co.uk/dirk/\]\n\ \ \ *\ http://www.bodhitree.com/booklists/i-ching.html\n\ \ \ *\ http://hexadecimal.uoregon.edu/ching/ching.html\n\n**Random\ Divination\ (\ non-Iching)**\n\ \ \ *\ Search\ on\ google.com\ &\ wikipedia\ \ for\ keywords\ :Limyran,\ Lycia,\ Sortes\ Astrampsych,\ thomas\ oracle,\ Bibliomancy\"\n\ \ \ *\ http://www.thing.de/projekte/7:9%23/dream_book.html\n\ \ \ *\ http://www.cs.utk.edu/~mclennan/BA/GAO.html\n\ \ \ *\ http://essenes.net/greekalpha.htm\n\ \ \ *\ http://www.cs.utk.edu/%7Emclennan/BA/LAO.txt\n\ \n**Programming\ References\ (\ TCL\ &\ C#\ )**\n\ \ \ *\ http://www.alanwood.net/unicode/yijing_hexagram_symbols.html\n\ \ \ *\ http://www.unicode.org/charts/PDF/U4DC0.pdf\n\ \ \ *\ http://www.wazu.jp/gallery/Test_AncientChineseSymbols.html\n\ \ \ *\ http://www.unicode.org/charts/PDF/U1D360.pdf\n\ \ \ *\ c#\ based\ program\ as\ http://hexadecimal.uoregon.edu/ching/src.html\n\ \ \ *\ java\ \ http://mason.gmu.edu/~swingo/\n\ \ \ *\ \[Base\ conversion\]\n\ \ \ *\ Syntax\ or\ sin\ tax:\[I\ love\ foreach\]\ \[use\ while\ to\ iterate\ over\ a\ list\]\n\ \ \ *\ \[additional\ list\ functions\],\ \[string\ reverse\],\n\ \ \ *\ \[split\],\ \[list\]\n\ \ \ *\ \[recursive\ list\ searching\]\n----\ \n**Pretty\ Print\ Version**\n======\n\ \ \ \ #!/usr/bin/env\ wish\n\ \ \ \ #\ pretty\ print\ version\ from\ autoindent\ and\ ased\ editor\n\ \ \ \ #Iching_Fortunes\n\ \ \ \ #\ or\ Itching\ For\ Tunes\ \[%>\}\n\ \ \ \ #\ 6Feb2007,\ \[gold\]\n\ \ \ \ #\ working\ on\ XP\ starter\ code\n\ \ \ \ #\ top\ browser\ is\ written\ for\ windows\n\ \ \ \ #\ and\ should\ open\ file\ in\ notepad,\n\ \ \ \ #\ on\ left\ mouse\ click.\n\ \ \ \ package\ require\ Tk\n\ \ \ \ global\ bookvalue\ bookvalue2\n\ \ \ \ set\ colorground\ bisque\n\ \ \ \ set\ wow\ \"bone\ number\"\n\ \ \ \ proc\ xlistlistbox\ \{\}\ \{\n\ \ \ \ \ \ \ \ .labellabel\ delete\ 0\ end\n\ \ \ \ \ \ \ \ foreach\ filefile\ \[glob\ .*\ *\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \[file\ isdirectory\ \$filefile\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ filefile\ \"\$filefile/\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ .labellabel\ insert\ end\ \$filefile\;\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ proc\ xskipskipdirectory\ \{dir\}\ \{\n\ \ \ \ \ \ \ \ cd\ \$dir\n\ \ \ \ \ \ \ \ .realcommand\ configure\ -text\ \[pwd\]\n\ \ \ \ \ \ \ \ xlistlistbox\n\ \ \ \ \}\n\ \ \ \ proc\ clickclicklistbox\ \{\}\ \{\n\ \ \ \ \ \ \ \ catch\ \{\ set\ index\ \[lindex\ \[.labellabel\ curselection\]\ 0\]\ \}\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ if\ \{\ \$index\ ==\ \"\"\ \}\ \{\ return\ \}\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ set\ filename\ \[.labellabel\ get\ \$index\]\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ if\ \[file\ isdirectory\ \$filename\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ xskipskipdirectory\ \$filename\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #exec\ xedit\ \$file\ &\n\ \ \ \ \ \ \ \ \ \ \ \ #\ windows\ editor\n\ \ \ \ \ \ \ \ \ \ \ \ exec\ notepad\ \$filename\}\}\n\ \ \ \ \n\ \ \ \ wm\ title\ .\ \"File\ Starter\"\n\ \ \ \ frame\ .labelframe\n\ \ \ \ pack\ .labelframe\ -expand\ no\ -fill\ x\n\ \ \ \ label\ .labellabel1\ -text\ \"Directory:\"\n\ \ \ \ label\ .realcommand\ -text\ \"\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -relief\ groove\n\ \ \ \ pack\ .labellabel1\ -in\ .labelframe\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -side\ left\ -expand\ no\ -fill\ x\n\ \ \ \ pack\ .realcommand\ -in\ .labelframe\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -side\ left\ -expand\ yes\ -fill\ x\ -anchor\ w\n\ \ \ \ frame\ .listlistbox\n\ \ \ \ pack\ .listlistbox\ -expand\ yes\ -fill\ both\n\ \ \ \ listbox\ .labellabel\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -width\ 25\ -height\ 3\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -xscrollcommand\ \".xxxxaxis\ set\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -yscrollcommand\ \".yyyyaxis\ set\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -bg\ \$colorground\n\ \ \ \ scrollbar\ .yyyyaxis\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \".labellabel\ yview\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -orient\ v\n\ \ \ \ scrollbar\ .xxxxaxis\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \".labellabel\ xview\"\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -orient\ h\n\ \ \ \ pack\ .xxxxaxis\ -in\ .listlistbox\ -side\ bottom\ \ -fill\ x\ \ \ \ -expand\ no\n\ \ \ \ pack\ .yyyyaxis\ -in\ .listlistbox\ -side\ right\ \ \ -fill\ y\ \ \ \ -expand\ no\n\ \ \ \ pack\ .labellabel\ \ -in\ .listlistbox\ -side\ top\ \ \ \ \ -fill\ both\ -expand\ yes\n\ \ \ \ frame\ .buttonbuttonx\n\ \ \ \ pack\ .buttonbuttonx\ -fill\ x\n\ \ \ \ button\ .caster\ -text\ Cast_Bones\ -command\ \{bonereadxx\ 1\ \;castfortune\;\}\n\ \ \ \ button\ .coinster\ -text\ Coin_Toss\ -command\ \{bonereadxx\ 2\;castfortune\;\}\n\ \ \ \ \n\ \ \ \ button\ .done\ -text\ Exit\ -command\ exit\n\ \ \ \ pack\ .caster\ .coinster\ .done\ -in\ .buttonbuttonx\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -side\ top\ -fill\ x\n\ \ \ \ bind\ .labellabel\ <Double-1>\ clickclicklistbox\n\ \ \ \ \n\ \ \ \ pack\ \ \[\ label\ .ww\ -text\ \"Iching\ holding\ tank\ \"\ -bg\ \$colorground\]\n\ \ \ \ pack\ \[\ text\ .wxxccc\ -width\ 80\ -height\ 3\ -bg\ beige\ \]\n\ \ \ \ \n\ \ \ \ focus\ .wxxccc\ \ \ \ \ \ \ \ \ \ \ \;#\ allow\ keyboard\ input\n\ \ \ \ \n\ \ \ \ .wxxccc\ insert\ end\ \ \"xxx\ starter\ xxx\ \ \"\;\n\ \ \ \ \n\ \ \ \ scrollbar\ .scr\ -orient\ vertical\ -command\ \".can\ yview\"\n\ \ \ \ canvas\ .can\ -yscrollcommand\ \".scr\ set\"\ -width\ 240\ -bg\ \$colorground\n\ \ \ \ \n\ \ \ \ pack\ .can\ -fill\ both\ -expand\ 1\ -side\ left\n\ \ \ \ pack\ .scr\ -fill\ y\ -expand\ 0\ -side\ left\n\ \ \ \ \n\ \ \ \ set\ width\ 50\n\ \ \ \ set\ height\ 50\n\ \ \ \ set\ w\ \".can\"\n\ \ \ \ set\ x\ 100\n\ \ \ \ set\ y\ 100\n\ \ \ \ \n\ \ \ \ set\ dx\ 50\n\ \ \ \ set\ dy\ 30\n\ \ \ \ \n\ \ \ \ set\ colors\ \{white\ black\ \}\n\ \ \ \ set\ color\ 0\n\ \ \ \ #suchenwirth_subroutine\;\}\n\ \ \ \ proc\ lpick\ L\ \{lindex\ \$L\ \[expr\ \{int(rand()*\[llength\ \$L\])\}\ \]\;\}\n\ \ \ \ #\ utilities\n\ \ \ \ proc\ plainsub\ \{text\ item\ replacewith\}\ \{\n\ \ \ \ \ \ \ \ set\ text\ \[string\ map\ \[list\ \$item\ \$replacewith\]\ \$text\]\n\ \ \ \ \}\n\ \ \ \ proc\ %+\ \{a\ \ \}\ \{return\ \[string\ toupper\ \$a\]\;\ #%+\ tree\ >TREE\ \}\n\ \ \ \ proc\ %-\ \{a\ \ \}\ \{return\ \[string\ tolower\ \$a\]\;\ #%+\ Tree\ >tree\ \ \}\n\ \ \ \ proc\ %++\ \{a\ b\}\ \{return\ \$a\$b\;#%+*\ tree\ root\ \ >treeroot\ \}\n\ \ \ \ proc\ %--\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%--\ 5\ 7>5\ \}\n\ \ \ \ proc\ %%\ \{a\ b\}\ \{regsub\ -all\ \$b\ \$a\ \"\"\;#%%\ tree\ root\ \ >tree\ \}\n\ \ \ \ proc\ %1\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%1\ tree\ root>tree\ \}\n\ \ \ \ proc\ %2\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%2\ tree\ root>tree\ \}\n\ \ \ \ proc\ %3\ \{a\ b\}\ \{regsub\ \$b\ \$a\ \"\"\ a\;regsub\ \$b\ \$a\ \"\"\ a\;regsub\ \$b\ \$a\ \"\"\ a\;\ return\ \$a\;#%3\ tree\ root>tree\}\n\ \ \ \ proc\ %2x\ \ \{a\}\ \{return\ \$a\$a\;#%2x\ tree>treetree\}\n\ \ \ \ proc\ %3x\ \ \{a\}\ \{return\ \$a\$a\$a\;#%3x\ tree>treetreetree\}\n\ \ \ \ proc\ %4x\ \ \{a\}\ \{return\ \"\$a,\$a,\$a\"\;#%5x\ tree>tree,tree,tree\ \}\n\ \ \ \ proc\ %5x\ \ \{a\}\ \{return\ \"\$a\ \$a\ \$a\"\;#%5x\ tree>tree\ tree\ tree\ \}\n\ \ \ \ proc\ repeat\ \{n\ body\}\ \{while\ \{\$n\}\ \{incr\ n\ -1\;\ uplevel\ \$body\}\}\n\ \ \ \ proc\ random\ n\ \{expr\ \{round(\$n*rand())\}\}\n\ \ \ \ proc\ whitelist\ \{a\}\ \{return\ \[lreplace\ \$a\ 0\ -1\]\;#take\ string,return\ list\ without\ blanks\}\n\ \ \ \ set\ k\ \[split\ \{abcdefghijklmnopqrstuvwxyz\}\ \{\}\]\n\ \ \ \ proc\ average\ L\ \{expr\ (\[join\ \$L\ +\])/\[llength\ \$L\].\}\n\ \ \ \ proc\ srevert\ s\ \{\n\ \ \ \ \ \ \ \ set\ l\ \[string\ length\ \$s\]\n\ \ \ \ \ \ \ \ set\ res\ \"\"\n\ \ \ \ \ \ \ \ while\ \{\$l\}\ \{append\ res\ \[string\ index\ \$s\ \[incr\ l\ -1\]\]\}\n\ \ \ \ \ \ \ \ set\ res\n\ \ \ \ \}\;#\ RS,\n\ \ \ \ \n\ \ \ \ proc\ lreverse\ L\ \{\n\ \ \ \ \ \ \ \ set\ res\ \{\}\n\ \ \ \ \ \ \ \ set\ i\ \[llength\ \$L\]\n\ \ \ \ \ \ \ \ #while\ \{\[incr\ i\ -1\]>=0\}\ \{lappend\ res\ \[lindex\ \$L\ \$i\]\}\n\ \ \ \ \ \ \ \ while\ \{\$i\}\ \{lappend\ res\ \[lindex\ \$L\ \[incr\ i\ -1\]\]\}\ \;#\ rmax\n\ \ \ \ \ \ \ \ set\ res\n\ \ \ \ \}\ \;#\ RS,\ tuned\ 10%\ faster\ by\ \[rmax\]\n\ \ \ \ \n\ \ \ \ proc\ sumoflist\ \ L\ \{expr\ \[join\ \[split\ \$L\ \"\"\]\ +\]+0\}\ \;#\ RS\n\ \ \ \ proc\ convertbase2to10\ \{jip\}\ \{\n\ \ \ \ \ \ \ \ set\ l\ \[split\ \$jip\ \"\"\]\n\ \ \ \ \ \ \ \ set\ t\ 0\;\ set\ e\ 0\;\n\ \ \ \ \ \ \ \ foreach\ n\ \$l\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ exp\ \[\ expr\ int(pow(2,\$e))\]\;\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ t\ \[\ expr\ \$n\ *\ \$exp\ \ \]\ \;\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ e\;\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$t\}\n\ \ \ \ proc\ kvsearch\ \{kvlist\ item\}\ \{\n\ \ \ \ \ \ \ \ set\ pos\ \[lsearch\ \$kvlist\ \$item\]\n\ \ \ \ \ \ \ \ if\ \{\$pos\ !=\ -1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lindex\ \$kvlist\ \[expr\ \{\$pos+1-2*(\$pos%2)\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\ \;#\ RS\n\ \ \ \ #\ end\ utilities\n\ \ \ \ #start\ iching\ data\n\ \ \ \ set\ bookvalue\ \ \[\ list\ \ 1\ \ 63\ \ 43\ \ 62\ \ 14\ \ 61\ \ 34\ \ 60\ \ 9\ \ 59\ \ 5\ 58\ 26\ \ 57\ \ 11\ \ 56\ \ 10\ \ 55\ \ 58\ \ 54\ \ 38\ \ 53\ \ 54\ \ 52\ \ 61\ \ 51\ 60\ \ 50\ 41\ \ 49\ \ 19\ \ 48\ 13\ \ 47\ \ 49\ \ 46\ \ 30\ \ 45\ \ 55\ \ 44\ \ 37\ \ 43\ \ 63\ \ 42\ \ 22\ \ 41\ \ 36\ \ 40\ \ 25\ \ 39\ \ 17\ \ 38\ \ 21\ \ 37\ \ 51\ \ 36\ \ 42\ \ 35\ \ 3\ \ 34\ \ 27\ \ 33\ \ 24\ \ 32\ \ 44\ \ 31\ \ 28\ \ 30\ \ 50\ \ 29\ \ 32\ \ 28\ \ 57\ \ 27\ \ 48\ \ 26\ \ 18\ \ 25\ \ 46\ \ 24\ \ 6\ \ 23\ \ 47\ \ 22\ \ 64\ \ 21\ \ 40\ \ 20\ \ 59\ \ 19\ \ 29\ \ 18\ 4\ 17\ \ 7\ \ 16\ \ 33\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ 10\ \ 52\ \ 9\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ \ 10\ 52\ \ 9\ \ 15\ 8\ 12\ \ \ 7\ \ 45\ \ 6\ \ 35\ \ 5\ \ 16\ \ 4\ \ 20\ \ 3\ \ \ 23\ \ 1\ \ 2\ \ 0\ 8\ 2\ \]\n\ \ \ \ set\ bookvalue2\ \ \[\ list\ 9999\ 1\ \ 63\ \ 43\ \ 62\ \ 14\ \ 61\ \ 34\ \ 60\ \ 9\ \ 59\ \ 5\ 58\ 26\ \ 57\ \ 11\ \ 56\ \ 10\ \ 55\ \ 58\ \ 54\ \ 38\ \ 53\ \ 54\ \ 52\ \ 61\ \ 51\ 60\ \ 50\ 41\ \ 49\ \ 19\ 48\ \ 13\ \ 47\ \ 49\ \ 46\ \ 30\ \ 45\ \ 55\ \ 44\ \ 37\ \ 43\ \ 63\ \ 42\ \ 22\ \ 41\ \ 36\ \ 40\ \ 25\ \ 39\ \ 17\ \ 38\ \ 21\ \ 37\ \ 51\ \ 36\ \ 42\ \ 35\ \ 3\ \ 34\ \ 27\ \ 33\ \ 24\ \ 32\ \ 44\ \ 31\ \ 28\ \ 30\ \ 50\ \ 29\ \ 32\ \ 28\ \ 57\ \ 27\ \ 48\ \ 26\ \ 18\ \ 25\ \ 46\ \ 24\ \ 6\ \ 23\ \ 47\ \ 22\ \ 64\ \ 21\ \ 40\ \ 20\ \ 59\ \ 19\ \ 29\ \ 18\ 4\ 17\ \ 7\ \ 16\ \ 33\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ 10\ \ 52\ \ 9\ \ 15\ \ 31\ \ 14\ \ 56\ \ 13\ \ 62\ \ 12\ \ 53\ \ 11\ \ 39\ \ 10\ 52\ \ 9\ \ 15\ 8\ 12\ \ \ 7\ \ 45\ \ 6\ \ 35\ \ 5\ \ 16\ \ 4\ \ 20\ \ 3\ \ \ 23\ \ 1\ \ 2\ \ 0\ 8\ 2\ \]\n\ \ \ \ if\ 0\ \{\ iching\ hexagrams\ and\ trigrams\ \}\n\ \ \ \ if\ 0\ \{\ Little\ API\ style\ database\ \}\n\ \ \ \ \n\ \ \ \ set\ \ chartbamboo\ \{\ \"\ list\n\ \ \ \ \ \ \ \ +\ hexagram_1\ :\ pinyin\ Qian\ wade\ Ch'ien\ english\ \{The\ Creative\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_2\ :\ pinyin\ Kun\ wade\ \ K'un\ english\ \{The\ Receptive\}\n\ \ \ \ \ \ \ \ +\ hexagram_3\ :\ pinyin\ Zhun\ wade\ Chun\ english\ \{\ Difficulty\ at\ the\ Beginning\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_4\ :\ pinyin\ Meng\ wade\ Mêng\ english\ \{Youthful\ Folly\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_5\ :\ pinyin\ Xu\ wade\ Hsü\ english\ \{Waiting\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_6\ :\ pinyin\ \ Song\ wade\ Sung\ english\ \{Conflict\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_7\ :\ pinyin\ \ Shi\ wade\ Shih\ english\ \{The\ Army\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_8\ :\ pinyin\ \ Bi\ wade\ Pi\ english\ \{Holding\ Together\}\n\ \ \ \ \ \ \ \ +\ hexagram_9\ :\ pinyin\ \ Xiaoxu\ wade\ Hsiao\ Ch'u\ english\ \{The\ Taming\ Power\ of\ the\ Small\}\n\ \ \ \ \ \ \ \ +\ hexagram_10\ :\ pinyin\ Lü\ wade\ Lü\ english\ \{Treading\}\n\ \ \ \ \ \ \ \ +\ hexagram_11\ :\ pinyin\ Tai\ wade\ T'ai\ english\ \{Peace\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_12\ :\ pinyin\ Pi\ wade\ P'i\ english\ \{Standstill\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_13\ :\ pinyin\ Tongren\ wade\ \{T'ung\ Jên\}\ english\ \{Fellowship\ with\ Men\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_14\ :\ pinyin\ Dayou\ wade\ \{\ Ta\ Yu\ \}\ english\ \{Possession\ in\ Great\ Measure\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_15\ :\ pinyin\ Qian\ wade\ Ch'ien\ english\ \{Modesty\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_16\ :\ pinyin\ Yu\ wade\ Yü\ english\ \{Enthusiasm\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_17\ :\ pinyin\ Sui\ wade\ Sui\ english\ \{Following\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_18\ :\ pinyin\ Gu\ wade\ Ku\ english\ \{Work\ on\ What\ Has\ Been\ Spoiled\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_19\ :\ pinyin\ Lin\ wade\ Lin\ english\ \{Approach\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_20\ :\ pinyin\ Guan\ wade\ Kuan\ english\ \{Contemplation\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_21\ :\ pinyin\ Shike\ wade\ \{Shih\ Ho\ \}\ english\ \{Biting\ Through\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_22\ :\ pinyin\ Bi\ wade\ Pi\ english\ \{Grace\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_23\ :\ pinyin\ Bo\ wade\ Po\ english\ \{Splitting\ Apart\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_24\ :\ pinyin\ Fu\ wade\ Fu\ english\ \{Return\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_25\ :\ pinyin\ Wuwang\ wade\ \{\ Wu\ Wang\ \}english\ \{Innocence\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_26\ :\ pinyin\ Daxu\ wade\ \{\ Ta\ Ch'u\ \}\ english\ \{The\ Taming\ Power\ of\ the\ Great\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_27\ :\ pinyin\ Yi\ wade\ I\ english\ \{The\ Corners\ of\ the\ Mouth\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_28\ :\ pinyin\ Daguo\ wade\ \{\ Ta\ Kuo\ \}\ english\ \{Preponderance\ of\ the\ Great\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_29\ :\ pinyin\ Kan\ wade\ K'an\ english\ \{The\ Abysmal\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_30\ :\ pinyin\ Li\ wade\ Li\ english\ \{The\ Clinging\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_31\ :\ pinyin\ Xian\ wade\ \ Hsien\ english\ \{Influence\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_32\ :\ pinyin\ Heng\ wade\ \ Hêng\ english\ \{Duration\}\n\ \ \ \ \ \ \ \ +\ hexagram_33\ :\ pinyin\ Dun\ \ wade\ \ Tun\ english\ \{Retreat\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_34\ :\ pinyin\ Dazhuang\ wade\ \{\ Ta\ Chuang\ \}\ english\ \{The\ Power\ of\ the\ Great\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_35\ :\ pinyin\ Jin\ wade\ Chin\ english\ \{Progress\}\n\ \ \ \ \ \ \ \ +\ hexagram_36\ :\ pinyin\ Mingyi\ wade\ \{\ Ming\ I\ \}\ english\ \{Darkening\ of\ the\ Light\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_37\ :\ pinyin\ Jiaren\ wade\ Chia\ Jên\ english\ \{\ The\ Family\}\n\ \ \ \ \ \ \ \ +\ hexagram_38\ :\ pinyin\ Kui\ wade\ K'uei\ english\ \{Opposition\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_39\ :\ pinyin\ Jian\ wade\ Chien\ english\ \{Obstruction\}\n\ \ \ \ \ \ \ \ +\ hexagram_40\ :\ pinyin\ \ Xie\ wade\ Hsieh\ english\ \{Deliverance\}\n\ \ \ \ \ \ \ \ +\ hexagram_41\ :\ pinyin\ Sun\ \ wade\ Sun\ english\ \{Decrease\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_42\ :\ pinyin\ Yi\ \ wade\ I\ english\ \{Increase\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_43\ :\ pinyin\ Guai\ wade\ Kuai\ english\ \{Break-through\}\n\ \ \ \ \ \ \ \ +\ hexagram_44\ :\ pinyin\ Gou\ wade\ Kou\ english\ \{Coming\ to\ Meet\}\n\ \ \ \ \ \ \ \ +\ hexagram_45\ :\ pinyin\ Cui\ wade\ Ts'ui\ english\ \{Gathering\ Together\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_46\ :\ pinyin\ Sheng\ wade\ Shêng\ english\ \{Pushing\ Upward\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_47\ :\ pinyin\ Kun\ wade\ K'un\ english\ \{Oppression\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_48\ :\ pinyin\ Jing\ wade\ Ching\ english\ \{The\ Well\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_49\ :\ pinyin\ Ge\ wade\ Ko\ english\ \{Revolution\}\n\ \ \ \ \ \ \ \ +\ hexagram_50\ :\ pinyin\ Ding\ wade\ Ting\ english\ \{The\ Caldron\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_51\ :\ pinyin\ Zhen\ wade\ Chên\ english\ \{The\ Arousing\ \ \}\n\ \ \ \ \ \ \ \ +\ hexagram_52\ :\ pinyin\ Gen\ wade\ Kên\ english\ \{Keeping\ Still\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_53\ :\ pinyin\ Jian\ wade\ Chien\ english\ \{Development\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_54\ :\ pinyin\ Guimei\ wade\ \{Kuei\ Mei\}\ english\ \{The\ Marrying\ Maiden\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_55\ :\ pinyin\ Feng\ wade\ Fêng\ english\ \{Abundance\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_56\ :\ pinyin\ Lü\ wade\ Lü\ english\ \{The\ Wanderer\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_57\ :\ pinyin\ Xun\ wade\ Sun\ english\ \{The\ Gentle\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_58\ :\ pinyin\ Dui\ wade\ Tui\ english\ \{The\ Joyous\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_59\ :\ pinyin\ Huan\ wade\ Huan\ english\ \{\ Dispersion\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_60\ :\ pinyin\ Jie\ wade\ Chieh\ english\ \{Limitation\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_61\ :\ pinyin\ Zhongfu\ wade\ \{Chung\ Fu\}\ english\ \{InnerTruth\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_62\ :\ pinyin\ Xiaoguo\ wade\ \{\ Hsiao\ Kuo\}\ english\ \{Preponderance\ of\ the\ Small\ \}\n\ \ \ \ \ \ \ \ +\ hexagram_63\ :\ pinyin\ Jiji\ wade\ \{\ Chi\ Chi\ \}\ english\ \{After\ Completion\}\n\ \ \ \ \ \ \ \ +\ hexagram_64\ :\ pinyin\ Weiji\ wade\ \{\ Wei\ Chi\ \}\ english\ \{Before\ Completion\ \}\n\ \ \ \ \ \ \ \ \"\ \ \}\n\ \ \ \ proc\ plainsub\ \{text\ item\ replacewith\}\ \{\n\ \ \ \ \ \ \ \ set\ text\ \[string\ map\ \[list\ \$item\ \$replacewith\]\ \$text\]\ \}\n\ \ \ \ foreach\ piece\ \{\ +\ :\ \\\{\ \\\}\ \}\ \ \{\n\ \ \ \ \ \ \ \ set\ \ chartbamboo\ \[\ plainsub\ \$chartbamboo\ \$piece\ \"*\"\ \]\n\ \ \ \ \}\n\ \ \ \ \n\ \ \ \ set\ reading\ \[\ list\ \[\ split\ \$chartbamboo\ \"\ \"\ \]\]\n\ \ \ \ \n\ \ \ \ #end\ iching\ data\n\ \ \ \ proc\ binaryexchange\ \{gualisting\}\ \{\n\ \ \ \ \ \ \ \ #\ converts\ gualisting\ as\ a\ list\n\ \ \ \ \ \ \ \ #\ to\ binary\ &\ decimal\ numbers.\n\ \ \ \ \ \ \ \ global\ dx\ dy\ colors\ color\n\ \ \ \ \ \ \ \ global\ guabinary\ guadecimal\ guatransform\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ whitelist\ \$gualisting\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ join\ \[\ split\ \$guabinary\ \"\ \"\]\]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 6\ 0\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 7\ 1\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 8\ 0\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ 9\ 1\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ plainsub\ \$guabinary\ \"\ \"\ \"\"\ \]\;\n\ \ \ \ \ \ \ \ return\ \$guabinary\;\n\ \ \ \ \}\n\ \ \ \ proc\ second_hexagram_compute\ \{gualisting\ \}\ \{\n\ \ \ \ \ \ \ \ #\ subroutine\ under\ test\n\ \ \ \ \ \ \ \ global\ bookvalue\ second_hexagram\n\ \ \ \ \ \ \ \ #set\ gualisting\ \[\ lreverse\ \$gualisting\]\;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \[\ list\ \]\;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \ \[\ join\ \$gualisting\ \]\ \;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \[\ plainsub\ \$second_hexagram\ 6\ 7\ \]\;\n\ \ \ \ \ \ \ \ set\ second_hexagram\ \ \[\ plainsub\ \$second_hexagram\ 9\ 6\ \]\;\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ binaryexchange\ \$second_hexagram\ \]\;\n\ \ \ \ \ \ \ \ set\ decimalout\ \[\ convertbase2to10\ \$guabinary\ \]\;\n\ \ \ \ \ \ \ \ set\ bookgua\ \[\ kvsearch\ \$bookvalue\ \$decimalout\ \]\;\n\ \ \ \ \ \ \ \ return\ \$bookgua\;\n\ \ \ \ \}\n\ \ \ \ proc\ bonereadxx\ \{coinsread\}\ \{\n\ \ \ \ \ \ \ \ global\ dx\ dy\ colors\ color\ gualisting\ reading\n\ \ \ \ \ \ \ \ global\ bookvalue\ bookvalue2\ second_hexagram\n\ \ \ \ \ \ \ \ set\ dj\ 1\;\n\ \ \ \ \ \ \ \ set\ gualisting\ \[list\ \]\;\n\ \ \ \ \ \ \ \ if\ \{\ \$coinsread\ ==\ 1\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\}\ \{\$j<6\}\ \{incr\ j\ \$dj\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone1\ \[lpick\ \{3\ 3\ 3\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone2\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone3\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bonereading\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ wow\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ gualisting\ \$wow\;\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ if\ \{\ \$coinsread\ ==\ 2\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\}\ \{\$j<6\}\ \{incr\ j\ \$dj\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone1\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone2\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bone3\ \[lpick\ \{3\ 3\ 2\ 2\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ bonereading\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ wow\ \[expr\ \$bone1\ +\ \$bone2\ +\ \$bone3\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ gualisting\ \$wow\;\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ #set\ guabinary\ \[\ list\ 1\ 0\ 1\ 1\ 1\ si\ tiene\ problema\ \]\n\ \ \ \ \ \ \ \ set\ gualisting\ \[\ lreverse\ \$gualisting\]\;\n\ \ \ \ \ \ \ \ #\ reading\ hexagram\ lines\ top\ down,\n\ \ \ \ \ \ \ \ #\ opposed\ to\ reverse(down\ top)\n\ \ \ \ \ \ \ \ #\ give\ different\ binary\ values\n\ \ \ \ \ \ \ \ #\n\ \ \ \ \ \ \ \ set\ guabinary\ \[\ binaryexchange\ \$gualisting\ \]\;\n\ \ \ \ \ \ \ \ set\ decimalout\ \[\ convertbase2to10\ \$guabinary\ \]\;\n\ \ \ \ \ \ \ \ set\ bookgua\ \[\ kvsearch\ \$bookvalue2\ \$decimalout\ \]\;\n\ \ \ \ \ \ \ \ set\ second_hexa\ \[\ second_hexagram_compute\ \$gualisting\ \]\;\n\ \ \ \ \ \ \ \ .wxxccc\ delete\ 1.0\ end\;\n\ \ \ \ \ \ \ \ set\ outoutfoulspirit\ \"\ last\ bone\ is\ \$wow\ .gua\ listing\ is\ \ \ \$gualisting\ &&\ binary\ \$guabinary\ &&\ decimal\ \$decimalout\ &&Iching_gua_#\ \$bookgua\ &&\ \ test\ 2nd\ hex.\ \$second_hexagram\ &&\ 2nd\ h.\ test\ \$second_hexa\ &&\ \$second_hexagram\n\ \ \ \ \ \ \ \ \$reading\ \"\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ .wxxccc\ insert\ end\ \$outoutfoulspirit\ \ \ \ \ \ \}\n\ \ \ \ \n\ \ \ \ proc\ castfortune\ \{\}\ \{\n\ \ \ \ \ \ \ \ global\ dx\ dy\ colors\ color\ gualisting\ second_hexagram\n\ \ \ \ \ \ \ \ set\ colorx\ black\;\n\ \ \ \ \ \ \ \ for\ \{set\ i\ 0\;\ set\ y\ 0\}\ \{\$i<6\}\ \{incr\ i\;\ incr\ y\ \$dy\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ brown\;\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\;\ set\ x\ 0\}\ \{\$j<3\}\ \{incr\ j\;\ incr\ x\ \$dx\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ brown\;\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \$j\ ==\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 6\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 7\}\ \{set\ colorx\ brown\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 8\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$gualisting\ \$i\ \]\ ==\ 9\}\ \{set\ colorx\ brown\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .can\ create\ rectangle\ \$x\ \$y\ \[expr\ \{\$x+\$dx\}\]\ \[expr\ \{\$y+\$dy\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ \$colorx\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \}\}\n\ \ \ \ \ \ \ \ set\ dx\ 50\n\ \ \ \ \ \ \ \ set\ dy\ 30\n\ \ \ \ \ \ \ \ set\ colorx\ blue\;\n\ \ \ \ \ \ \ \ for\ \{set\ i\ 0\;\ set\ y\ 0\}\ \{\$i<6\}\ \{incr\ i\;\ incr\ y\ \$dy\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ blue\;\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ j\ 0\;\ set\ x\ 0\}\ \{\$j<3\}\ \{incr\ j\;\ incr\ x\ \$dx\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ colorx\ blue\;\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \$j\ ==\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 6\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 7\}\ \{set\ colorx\ blue\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 8\}\ \{set\ colorx\ white\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\ \[lindex\ \$second_hexagram\ \$i\ \]\ ==\ 9\}\ \{set\ colorx\ blue\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ .can\ create\ rectangle\ \[expr\ \$x\ +\ 180\]\ \$y\ \[expr\ \{\[expr\ \$x\ +180\ \]+\$dx\}\]\ \[expr\ \{\$y+\$dy\}\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ \$colorx\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \}\}\n\ \ \ \ \ \ \ \ \n\ \ \ \ \}\n\ \ \ \ \n\ \ \ \ xskipskipdirectory\ \$env(HOME)\n\ \ \ \n\ \ \ \ \n\n======\n----\n**Appendix\ Tables**\n======\n\ if\ 0\ \{\ iching\ hexagrams\ and\ trigrams\ \}\n|1.\ \ |Qian\ \ \ \ \ |Ch'ien,\ The\ Creative|\n|2.\ \ |Kun\ \ \ \ \ \ |K'un,\ The\ Receptive|\n|3.\ \ |Zhun\ \ \ \ \ |Chun,\ Difficulty\ at\ the\ Beginning|\n|4.\ \ |Meng\ \ \ \ \ |Mêng,\ Youthful\ Folly|\n|5.\ \ |Xu\ \ \ \ \ \ \ |Hsü,\ Waiting|\n|6.\ \ |Song\ \ \ \ \ |Sung,\ Conflict|\n|7.\ \ |Shi\ \ \ \ \ \ |Shih,\ The\ Army|\n|8.\ \ |Bi\ \ \ \ \ \ \ |Pi,\ Holding\ Together|\n|9.\ \ |Xiaoxu\ \ \ |Hsiao\ Ch'u,\ The\ Taming\ Power\ of\ the\ Small|\n|10.\ \ |Lü\ \ \ \ \ \ \ |Lü,\ Treading|\n|11.\ \ |Tai\ \ \ \ \ \ |T'ai,\ Peace|\n|12.\ \ |Pi\ \ \ \ \ \ \ |P'i,\ Standstill|\n|13.\ \ |Tongren\ \ |T'ung\ Jên,\ Fellowship\ with\ Men|\n|14.\ \ |Dayou\ \ \ \ |Ta\ Yu,\ Possession\ in\ Great\ Measure|\n|15.\ \ |Qian\ \ \ \ \ |Ch'ien,\ Modesty|\n|16.\ \ |Yu\ \ \ \ \ \ \ |Yü,\ Enthusiasm|\n|17.\ \ |Sui\ \ \ \ \ \ |Sui,\ Following|\n|18.\ \ |Gu\ \ \ \ \ \ \ |Ku,\ Work\ on\ What\ Has\ Been\ Spoiled|\n|19.\ \ |Lin\ \ \ \ \ \ |Lin,\ Approach|\n|20.\ \ |Guan\ \ \ \ \ |Kuan,\ Contemplation|\n|21.\ \ |Shike\ \ \ \ |Shih\ Ho,\ Biting\ Through|\n|22.\ \ |Bi\ \ \ \ \ \ \ |Pi,\ Grace|\n|23.\ \ |Bo\ \ \ \ \ \ \ |Po,\ Splitting\ Apart|\n|24.\ \ |Fu\ \ \ \ \ \ \ |Fu,\ Return|\n|25.\ \ |Wuwang\ \ \ |Wu\ Wang,\ Innocence|\n|26.\ \ |Daxu\ \ \ \ \ |Ta\ Ch'u,\ The\ Taming\ Power\ of\ the\ Great|\n|27.\ \ |Yi\ \ \ \ \ \ \ |I,\ The\ Corners\ of\ the\ Mouth|\n|28.\ \ |Daguo\ \ \ \ |Ta\ Kuo,\ Preponderance\ of\ the\ Great|\n|29.\ \ |Kan\ \ \ \ \ \ |K'an,\ The\ Abysmal|\n|30.\ \ |Li\ \ \ \ \ \ \ |Li,\ The\ Clinging|\n|31.\ \ |Xian\ \ \ \ \ |Hsien,\ Influence|\n|32.\ \ |Heng\ \ \ \ \ |Hêng,\ Duration|\n|33.\ \ |Dun\ \ \ \ \ \ |Tun,\ Retreat|\n|34.\ \ |Dazhuang\ |Ta\ Chuang,\ The\ Power\ of\ the\ Great|\n|35.\ \ |Jin\ \ \ \ \ \ |Chin,\ Progress|\n|36.\ \ |Mingyi\ \ \ |Ming\ I,\ Darkening\ of\ the\ Light|\n|37.\ \ |Jiaren\ \ \ |Chia\ Jên,\ The\ Family|\n|38.\ \ |Kui\ \ \ \ \ \ |K'uei,\ Opposition|\n|39.\ \ |Jian\ \ \ \ \ |Chien,\ Obstruction|\n|40.\ \ |Xie\ \ \ \ \ \ |Hsieh,\ Deliverance|\n|41.\ \ |Sun\ \ \ \ \ \ |Sun,\ Decrease|\n|42.\ \ |Yi\ \ \ \ \ \ \ |I,\ Increase|\n|43.\ \ |Guai\ \ \ \ \ |Kuai,\ Break-through|\n|44.\ \ |Gou\ \ \ \ \ \ |Kou,\ Coming\ to\ Meet|\n|45.\ \ |Cui\ \ \ \ \ \ |Ts'ui,\ Gathering\ Together|\n|46.\ \ |Sheng\ \ \ \ |Shêng,\ Pushing\ Upward|\n|47.\ \ |Kun\ \ \ \ \ \ |K'un,\ Oppression|\n|48.\ \ |Jing\ \ \ \ \ |Ching,\ The\ Well|\n|49.\ \ |Ge\ \ \ \ \ \ \ |Ko,\ Revolution|\n|50.\ \ |Ding\ \ \ \ \ |Ting,\ The\ Caldron|\n|51.\ \ |Zhen\ \ \ \ \ |Chên,\ The\ Arousing|\n|52.\ \ |Gen\ \ \ \ \ \ |Kên,\ Keeping\ Still|\n|53.\ \ |Jian\ \ \ \ \ |Chien,\ Development|\n|54.\ \ |Guimei\ \ \ |Kuei\ Mei,\ The\ Marrying\ Maiden|\n|55.\ \ |Feng\ \ \ \ \ |Fêng,\ Abundance|\n|56.\ \ |Lü\ \ \ \ \ \ \ |Lü,\ The\ Wanderer|\n|57.\ \ |Xun\ \ \ \ \ \ |Sun,\ The\ Gentle|\n|58.\ \ |Dui\ \ \ \ \ \ |Tui,\ The\ Joyous|\n|59.\ \ |Huan\ \ \ \ \ |Huan,\ Dispersion|\n|60.\ \ |Jie\ \ \ \ \ \ |Chieh,\ Limitation|\n|61.\ \ |Zhongfu\ \ |Chung\ Fu,\ Inner\ Truth|\n|62.\ \ |Xiaoguo\ \ |Hsiao\ Kuo,\ Preponderance\ of\ the\ Small|\n|63.\ \ |Jiji\ \ \ \ \ |Chi\ Chi,\ After\ Completion|\n|64.\ \ |Weiji\ \ \ \ |Wei\ Chi,\ Before\ Completion|\n======\n**The\ names\ of\ the\ trigrams**\n======\n|I\ \ \ |Ching\ \ \ \ |Trigram\ Name\ |\ Translations|\n|\ \ \ \ |Pinyin\ \ \ |Wade-Giles\ \ \ |\ (Wilhelm/Baynes)\ associations|\n|1.\ \ |Qian\ \ \ \ \ |Ch'ien\ \ \ \ \ \ \ |the\ creative,\ heaven,\ Father,northwest,head,lungs|\n|2.\ \ |Kun\ \ \ \ \ \ |K'un\ \ \ \ \ \ \ \ \ |the\ receptive,earth,Mother,southwest,abdomen,reproductive_organs|\n|3.\ \ |Zhen\ \ \ \ \ |Chên\ \ \ \ \ \ \ \ \ |the\ arousing,\ thunder,Eldest_Son,east,throat|\n|4.\ \ |Kan\ \ \ \ \ \ |K'an\ \ \ \ \ \ \ \ \ |the\ abysmal,water,Middle_Son,north,liver,kidneys,inner_ear|\n|5.\ \ |Gen\ \ \ \ \ \ |Kên\ \ \ \ \ \ \ \ \ \ |keeping\ still,\ mountain,Youngest_Son,northeast,hands,spine,bones|\n|6.\ \ |Xun\ \ \ \ \ \ |Sun\ \ \ \ \ \ \ \ \ \ |the\ gentle,\ wind,\ Eldest\ Daughter,southeast,hips,buttocks|\n|7.\ \ |Li\ \ \ \ \ \ \ |Li\ \ \ \ \ \ \ \ \ \ \ |the\ clinging,\ flame,Middle_Daughter,south,eyes,heart|\n|8.\ \ |Dui\ \ \ \ \ \ |Tui\ \ \ \ \ \ \ \ \ \ |the\ joyous,\ lake,Youngest_Daughter,west,mouth\ \}|\n\n----\n**Comments\ Section**\nPlease\ place\ any\ comments\ here,\ Thanks.\n\[gold\]\ Change:Redundant\ procedure\ ?\ deleted.\ \ \ \ \n\n\[LV\]\ slightly\ reformatted\ code\ to\ some\ level\ of\ consistency,\ added\ a\ few\nbraces\ around\ expr\ arguments,\ and\ removed\ a\ redundant\ proc\ definition.\n\n\[gold\]\ Change\ 13Mar2007:omitted\ **(exp)\ in\ expr\ for\ base2,\ TCL8.5&>.\n\nCJL\ thinks\ that\ following\ the\ guidelines\ \[http://wiki.tcl.tk/6\]\ would\ make\nthis\ page\ much\ more\ readable,\ and\ give\ browsers\ a\ chance\ to\ flow\ the\nformatting\n\n<<discussion>>\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n<<categories>>\ Numerical\ Analysis\ |\ Toys\ |\ Calculator\ |\ Mathematics|\ Example} CALL {my revision Iching_Fortunes} CALL {::oo::Obj3024843 process revision/Iching%5FFortunes} CALL {::oo::Obj3024841 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 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4