home
my Question journal
search for a hexagram ask a question draw a hexagram
what is the Yijing? the Ten Wings foreword by Jung preface by Wilhelm Dutch flag about us
support our site
Fu Xi Earlier Heaven bagua arrangement
易經
the Randomizer
to cast a hexagram
Ancient Chinese coins

易經
the Randomizer
to cast a hexagram





The kernel of the casting snippet to generate a hexagram uses a randomizer function and looks like this in Javascript:
Math.round (Math.random (0,1)) + 2, to obtain a value 2 or 3. Test this randomizer a few times by clicking on the white buttons.

Test the random head or coin

This random function throws 500,000 times one coin and shows how often it was head or coin (it takes a few seconds).



Test the random for the three coins

Three coins, each generating a value 2 or 3, will result in a 6, 7, 8 or 9.
This random function throws 500,000 times three coins and shows how often the value 6, 7, 8 or 9 was cast (it takes a few more seconds).