ART & METHOD

I-Ching Casting Library and Visualization

I developed a ruby library to generate hexagrams using the yarrow-stalk algorithm outlined in the appendix of Richard Wilhem's translation of the Chinese I-Ching ("Book of Changes").

The library supports the following features:

  • Hexagram and trigram casting using the traditional yarrow-stalk algorithm
  • Determination of nuclear trigrams for generated hexagrams
  • Determination of moving lines
  • Conversion of hexagrams and nuclear trigrams to ASCII
  • Conversion of hexagrams and nuclear trigrams to binary
  • Rudimentary English lookup of hexagram and nuclear trigram names by binary representation

The ruby I-Ching Casting library is available for download from my Github account.

The code is offered under the MIT license.

Visualization

Unsatisfied with the ASCII representation of hexagrams, I developed a visualization of the hexagrams using JRuby Processing. This visualization may be run within a web browser or as a stand-alone application.

If your browser supports Java plugins, try the visualization now.

I-Ching Casting Library and Visualization
I-Ching Casting Library and Visualization
I-Ching Casting Library and Visualization