In the last
Xiangshu module that I gave at the
Oriental College we also discussed the Heluo Lishu method of calculating a birth hexagram. Using your
bazi, your
eight characters which form the basis of your Chinese horoscope, you calculate two hexagrams: one for the first half of your life, and one for the second half. From these hexagrams you can calculate yearly hexagrams, monthly hexagrams and even daily hexagrams (although I have not yet worked out how the method of daily hexagrams could fit in our Western calendar).
Heluo Lishu was introduced to the West by Sherril & Chu in their book The Astrology of I Ching, but they made quite some modifications to the original material. For instance, they say that if a person is born at the end or the beginning of a month you should calculate two sets of bazi - one for the original and one for the adjecent month. This is simply not true, because no person has two sets of bazi. You are born at a specific time,and that time determines your bazi. They also took the winter solstice as start of the year, but for most forms of Chinese astrology the solar calendar is used, and in the solar calendar the year starts on or around 4 February. S&C skipped the calculation of monthly hexagrams, and they completely changed the method for calculating daily hexagrams, making it far more complex than the original method. They probably did this because the original method uses a fixed amount of 30 days in a month, but some solar months have 29 days, some 30, some 31. This indeed makes it hard to put the method for daily hexagrams to use, but what S&C made of it is extremely complex and far from the rules in the original method.
S&C give complex calculations to get your bazi, they use lots of tables which make it easy to make a mistake. And one small mistake will give a totally different outcome. You can skip the calculations for the bazi if you use a solar calendar, and this is what I learn my students.
But a computer program which does all the calculations for you would be even more welcome. There are already programs which do this, and 15 years ago in the good old days of MS-DOS I wrote one myself, but all these programs are based on the work of Sherril & Chu, with all the faults that come with this book. Time for a new! improved! version. The advantage of a computer program is not only that it can do the calculations for you, but you can also make statistics of your yearly hexagrams (which hexagram do you encounter most in your life, which one do you never have as a yearly hexagram) and other data.
So I picked up my programming skills, which by the way I don't have anymore. A lot has changed since the good old days of DOS. I used to program in Powerbasic for DOS, in that time a magnificent programming language which made writing code almost as easy as making a shopping list. But the latest version of Powerbasic for Windows is not suitable for anyone who is a novice in Windows programming. You need to know how Windows works at the core and why it works like it does. It is very hard to grasp the concepts of it. Since I am a hobbyist and not a diehard programmer with instant coffee on my desk I choose to program in Visual Basic 2005, using the Express edition that is freely available. You can say about Microsoft what you want, but they sure know how to promote their products. With VS2005 comes free video tutorials to get you started, there are manuals to explain the basics and the forum to dump your question when you get stuck can easily be accessed within the program. Programming in VS2005 is far more easier than in Powerbasic, because the IDE, the screen in which you type the code, helps you with writing by suggesting the proper code when you type a structure, procedure or whatever. Neat. It will probably create bloatware with lots of redundant code where Powerbasic can deliver complex programs which fit on a diskette, but it least I enjoy using it.
But although it is easier than Powerbasic it is still a totally different world to me. I have to work with classes, structures, forms, MDI's, modeless dialogs, public or private variables of type integer, double, string, event handlers, etc. Slowly I am progressing. Today I finished the module which calculates the bazi:
This is just a testing dialog, and if you think, pffff, that's nothing, then please keep in mind that the underlying code involves not only the calculation of the position of the sun for any given date & time (to find the start of the Chinese solar months), and that time corrections for UT and true local time are also made, with al the necessary code that comes with it. After that the bazi are calculated using some nifty routines which I partly wrote myself and partly took from Astronomy with your Personal Computer by Peter Duffett-Smith.
It is fun to do. It will take some time to finish, but hey, who said I was in a hurry?