Calculate Realignment Intervals

17 Dec. 1997

Notice of Sun 9 Aug 2020: The Chrome browser now has an extension to run the Java applets needed for this page. Search for "Chrome browser CheerpJ extension" or go directly to chrome.google.com/webstore/detail/cheerpj-applet-runner/bbmolahhldcbngedljfadjlognfaaein to download the extension. Then go to this page and simply click on an extension icon to run this applet! It may take a minute or so to come up.

Most calendars to designed not only to keep track of the positions of celestial luminaries such as the sun and moon, but also to do so in repeating cycles. In order to facilitate the design of calendars, it is advantageous to know the average periods in which those cycles repeat. I have defined a "realignment interval" to be a period of a whole number of days in which a given set of cycles realigns more accurately than in any smaller number. There is a page describing them in more detail at "Realignment Intervals".

The following three programs can be used to design a calendar as follows. (You must have a java-enabled browser to even see the programs on this page.) First, decide on the cycles you wish to include. Then choose than number from the menu and press "Create Realignment Table." Both synodic (relative to the earth) and sidereal (sid., relative to the stars) planetary periods are given. If the cycles you wish are not on the pulldown menus, you may enter your own under "Other." You may also modify the orbital periods listed, which are average values over the last few thousand years. The "Init Error" value is the initial alignment error in days which a cycle must have to qualify to be counted. Thereafter, every smaller period will also be listed. If you enter a value in the "Error" box, then after the error becomes that small, all cycles with error below that value will print, even though they are not the best ever. In other words, if you decide that an accuracy of .2 days is good enough, then all values below .2 will be included.

If you only have one cycle, you can use the following algorithm from elementary number theory to calculate the values. It is also useful for approximating any irrational number as a ever-improving series of rational approximations.

Sometimes it is nice to be able to factor the values obtained to see what units would be useful to count by, such as a week of seven days. For example, the realignment interval of 658,532 days for the lunisolar calendar has a factor of 7. Here is a factoring program:

Go to John Pratt's Home Page