My interest in the I Ching began when I was a music student. Studing John Cage, I learned that he was heavily influenced by the I Ching and used hexagrams as an aid to composition of aleatoric music. I bought a copy of the Richard Wilhelm translation and learned to cast hexagrams via the coin oracle. I revived this interest when I studied Tai Chi Chuan.
Every visitor to the front page of this website is greeted by a pair of I-Ching hexagrams, which are generated by this small python program. The distribution of results in the I-Ching is not uniform, and this page gives the same distribution of lines as the Yarrow Stalk oracle. The second hexagram is the first but with "moving lines" inverted in the traditional fashion. This website uses web.py, and I incorporate the I-Ching reading into the Cheetah template for the homepage. The relevant snippet of template code looks like this:
#import ching
#set $hexes = $ching.get_hexagram_pair
#set $hex1 = int($ching.get_hexagram_number($hexes[))][0]
#set $hex2 = int($ching.get_hexagram_number($hexes[))][1]
#set $name1 = $ching.get_hexagram_name($hexes[)][0]
#set $name2 = $ching.get_hexagram_name($hexes[)][1]
#echo '<img id="hex1" alt="%d: %s" src="/static/images/iching/Iching
-hexagram-%02d.png" />' % (hex1,name1 ,hex1) #
#echo '<img id="hex2" alt="%d: %s" src="/static/images/iching/Iching
-hexagram-%02d.png" />' % (hex2,name2 ,hex2) #
...and the lovely hexagram graphics are in the public domain. I downloaded them from the wikipedia.
permalink Updated: 2020-08-04