PtolemyChordTable.m

Functions for the Almagest I 11
by Nathan Sidoli

Introduction

The main benefit of PtolemyChordTable.m is that it saves one the tedium of repeatedly referring to the chord table while working through Ptolemy's calculations. Most of the functions are trivial from a mathematical perspective. They are all based on, and make use of, the chord table itself. Thus, the most important component of this package is the chord table found in Almagest I 11. The chord table has 3 columns of rational numbers in 365 rows. The first column contains angles from .5 to 180 in steps of .5. The second column contains the chords that correspond to these angles in sexagesimal fractions, under the assumption that Chord(180) = 120. The third column contains the modifiers to the chords in the second column for each additional sixtieth of degree between the actual angle and the angle that we use to determine the chord (the greatest entry in column 1 which <= actual angle). See Pedersen [1974, 63 - 5] for a formal description.

I have used the chord table in Toomer [1984, 57 - 60] which is the most accurate in print. There may, however, still be some errors in the table as it stands. I have included some functions for checking suspect entries (ChordTableElement(Inverse)[angle(chord)]). If an error is found please contact the author.

Ptolemy's Trigonometry

For the purpose of trigonometric mensuration, Ptolemy employs a single function: the chord. This strategy goes back at least as far as his predecessor Hipparchus, who is reported to have composed a work on chords which was probably somewhat simpler than what we find in Almagest I 11. I will not here go into the details of Ptolemy's trigonometry. This subject has been treated quite well by both Neugebauer [1975, 21 - 25] and Pederson [1974, 65 - 69]

Ptolemy derives his chord table from the properties of regular polygons and the application of areas, under the assumption that the diameter of the circle in which the chords are situated is 120. All of the propositions that he uses can be found in Euclid's Elements (II, IV, VI, & XIII), and his reasoning is very clearly layed out in Almagest I 10, Toomer [1984,  47 - 56].
	
Ptolemy is not explicit about how the chord table is to be used, but it is easy enough to infer the proceedure based on the form of the table and the examples we have in the text.

The Package

With no further ado, we call in PtolemyChordTable.m. (Note that, in order for PtolemyChordTable.m to be loaded by the following command, the file PtolemyChordTable.m should be placed in the AddOns/Applications subdirectory of the main Mathematica directory.  Alternatively, the directory where PtolemyChordTable.m is located should be added to the $Path variable using AppendTo[$Path, "DirectoryPath"].)

Needs["PtolemyChordTable`"]

The basic function in PtolemyChordTable.m is ChordTable[angle].

?ChordTable

This is done by scanning the chord table for the greatest half-angle that is <= the argument. The chord which corresponds to this half-angle is used as the basis for the returned value. This basis-chord is augmented as the actual angle is greater than the half-angle found in the chord table by intervals of 1/60th. In order to find the augmentation number, I have elected to simply round the number of 1/60ths between the actual angle and the nearest table entry which is <= the actual angle. The total augmentation to the basis-chord is the augmentation number * column 3. Thus if the angle in question is 35;37,37, the line in the chord table that will interest us is found by

ChordTableElement[35 + 37/60 + 37/60^2]

The basis-chord will be 36;35,1 and the augmentation number will be (35;37;37 - 35;30) * 60 = 7.6166... which rounds to 8. So we add 8 * 0;0;59,48 = 0.132889 to our basis-chord. This gives 36.5836 + 0.132889 = 36.7165. All of this is simplified in the above mentioned function:

ChordTable[35 + 37/60 + 37/60^2]

In order to view the result in a manner that would have pleased Ptolemy, we have the following function:

PtolemyForm[%]

PtolemyForm[x] returns integers followed by six sexagesimal places. For Ptolemy's practice of "casting out by circles" we have a function which "neglects whole circles" in its integer part.

PtolemyFormMod360[736 + 34/60 + 15/60^2]

This function gives the integer part modulo 360, but leaves the sexagesimal fractions unaffected.

Right Triangles

To determine the side of a right triangle, where an angle is known and the hypotenuse is assumed to be 120, Ptolemy makes use of the fact that on a given chord the angle at the center of the circle is double an angle on the circumference (Elements III 20). This is really just a modification of ChordTable[angle].

Thus if  23.465672 is an angle in a right triangle, then its chord, where the hypotenuse is 120, is given by

RightTriangleSide[23.465672]

We use the inverse function to find an angle given a side.

RightTriangleAngle[%]

Notice that these functions are not true inverses. This is due to the necessity of rounding and the use of augmentation by steps of 1/60ths.

General Triangles

Ptolemy has two procedures for working with general triangles that roughly correspond to applications of the cosine rule and sine rules; he uses these infrequently and rarely respectively. I have followed Ptolemy very exactly in writing these functions and the curious reader can consult the Almagest and PtolemyChordTable.m for the details. In what follows, I have in each case included the relevant trigonometric rule. Ptolemy, of course, makes no use of the trigonometric functions to achieve the same end.

Cosine Rule (a): (side3)^2 = (side1)^2 + (side2)^2 - 2(side1)(side2) (Cos[angle3])

?PtolemyCosRuleSide

.Cosine Rule (b): (Cos[angle3]) = [(side1)^2 + (side2)^2 - (side3)^2] / 2(side1)(side2)

?PtolemyCosRuleAngle

Sine Rule: (side1) / Sin[angle1] = (side2) / Sin[angle2]

?PtolemySinRule

An Example

In order to show the usefulness of PtolemyChordTable.m for the purpose of reading the Almagest we will work through the first calculation used to determine the ratio of the epicycle to the deferent for the first, simple anomaly of the moon, Almagest IV 6. A modern reading of this procedure can be found in Neugebauer [1975, 74 - 77], but these calculations will best be followed by referring to Ptolemy's own methods, Toomer [1984, 191 - 198].

The determination of the lunar epicycle is based on three "ancient" eclipse observations taken in Babylon. These are as follows:
 
 I 	-720 March 19/20, "an hour after moonrise," in Virgo 24.5 degrees
 II	-719 March 8/9, "exactly at midnight," in Virgo 13.75 degrees
 III	-719 September, 1/2. "after moonrise," in Pisces 3.24 degrees
 
 From these we can determine the time intervals between two different sets of eclipses, namely I to II and II to III. The interval between the first and the second is

t1   =  354 + (2 + 17/30)/24;

"reckoned in mean solar days." And the interval between the second and the third, in the same units, is

t2  =  176 + (20 + 1/5)/24;

Ptolemy has, at this point in his argument, already derived a mean motion table for the moon's motion in both longitude and anomaly, Almagest IV 4, and he, in essence, takes figures from this table to find the change in longitude and anomaly over the two given time intervals:

deltameanlongitude1 =  345 + 51/60;
deltaanomaly1  =  306 + 25/60;
deltameanlongitude2  =  170 + 7/60;
deltaanomaly2 =  150 + 26/60;

These figures allow us to imagine all of these eclipses as occurring on a single position of the moon's epicycle (or eccentric). This is done by allowing the arc which corresponds to change in anomaly over the first interval to specify an arbitrary starting point for angular measurements and setting the other intervals relative to this. The positions of the eclipses on the imaginary epicycle (or eccentric) are then A, B, and C.

arcBA = 360 - deltaanomaly1;
arcBG = deltaanomaly2;
arcAG = deltaanomaly2 - arcBA;

In order to determine the apparent positions of the eclipses on the imaginary epicycle (or eccentric) it will be sufficient to find the difference between the angular span between the true zodiacal appearances of two eclipses and the changes in mean longitude that have occurred between the two observations.

The angular span is found by considering the Zodiac itself.

I to II is Virgo 24.5 to Virgo 13.75, or 349.25 degrees.
II to III is Virgo 13.75 to Pisces 3.25. or 169.5 degrees.

Ptolemy provides two different figures for the epicyclic and eccentric hypotheses (fig. 4.4 & fig. 4.5, pp. 193 - 194) and he will have us understand that his reasoning can readily be transferred between the two, however, he only carries out calculations for the epicyclic hypothesis. The apparent positions of the eclipses on the imaginary epicycle (or eccentric) marks the first difference between the two hypotheses, because in the case of the epicyclic hypothesis the earth is outside the circle upon which the moon travels while in the case of the eccentric hypothesis it is inside of it.

At this point it becomes necessary for the persevering readers to avail themselves of the figures for Almagest IV 6.

The Epicycle

The epicyclic hypothesis distinguishes itself from the eccentric in that the angles between the apparent eclipses are quite small. They are found by taking the difference between the angular span between the zodiacal positions of the eclipses and the change in mean longitude over the time interval between them, Toomer [1984, 193].

angleADB = 349 + 15/60 - deltameanlongitude1;
PtolemyForm[angleADB]

angleBDG  =  
        Abs[169 + 30/60  -  deltameanlongitude2];
PtolemyForm[angleBDG]

Now, E is a point on the circumference of the epicycle so the angles at E will be half of their arcs.

angleBEA = arcBA/2;
PtolemyForm[angleBEA]

\(angleBEG = arcBG/2; 
PtolemyForm[angleBEG]\)

\(angleAEG = arcAG/2; 
PtolemyForm[angleAEG]\)

AngleBEA is an external angle for triangleDEA, angleBEG is an external angle for triangleDEG, and angleTGE one of the acute angles in right triangleTGE, thus:

\(angleEAZ = angleBEA - angleADB; 
PtolemyForm[angleEAZ]\)

\(angleEGD = angleBEG + angleBDG; 
PtolemyForm[angleEGD]\)

\(angleTGE = 90 - angleAEG; 
PtolemyForm[angleTGE]\)

The chordAG, where the diameter of the epicycle is 120, is

\(AG\  = \ ChordTable[arcAG]; 
PtolemyForm[AG]\)

In the right triangleEZD, where DE is 120, EZ will be found as follows:

\(EZonDE\  = \ RightTriangleSide[angleADB]; 
PtolemyForm[EZonDE]\)

In the right triangleEAZ we can find EZ, where AE is 120, from whence we can express AE in the same units as DE.

\(EZonAE\  = \ RightTriangleSide[angleEAZ]; 

    AEonDE\  = \ 120*EZonDE/EZonAE; 
PtolemyForm[AEonDE]\)

EH is found in right triangleDEH and right triangleGEH and EH and GE are expressed in the same units as DE.

\(EHonDE\  = \ RightTriangleSide[angleBDG]; 
PtolemyForm[EHonDE]\)

\(EHonGE\  = \ RightTriangleSide[angleEGD]; 

    GEonDE\  = \ 120*EHonDE/EHonGE; 
PtolemyForm[GEonDE]\)

GT and ET are found in the right triangleGTE and both of these are expressed in the same units as DE.

\(GTonGE\  = \ RightTriangleSide[angleAEG]; 

    GTonDE\  = \ GEonDE*GTonGE/120; 
PtolemyForm[GTonDE]\)

\(ETonGE\  = \ RightTriangleSide[90 - angleAEG]; 

    ETonDE\  = \ GEonDE*ETonGE/120; 
PtolemyForm[ETonDE]\)

TA and AG are now known in the same units as DE.

\(TAonDE\  = \ \ AEonDE\  - \ ETonDE; 
PtolemyForm[TAonDE]\)

\(AGonDE\  = \ Sqrt[TAonDE^2\  + \ GTonDE^2]; 
PtolemyForm[AGonDE]\)

With this we can now find DE and GE where the diameter of the epicycle is 120, because AG is known in these units.

\(DE\  = \ 120*AG/AGonDE; 
PtolemyForm[DE]\)

\(GE\  = \ DE*GEonDE/120; 
PtolemyForm[GE]\)

BE, in the same units is found by calculating arcBE and finding its chord.

\(arcGE\  = \ ChordTableInverse[GE]; 
arcBE\  = \ arcGE\  + \ arcBG; 

    BE\  = \ ChordTable[arcBE]; 
PtolemyForm[BE]\)

DK, in the same units, is found through the Pythagorean theorem (Elements I 47) and the length of the radius of the epicycle can now be expressed where the radius of the deferent is 60.

\(DK\  = \ Sqrt[3600\  + \ \((\((BE + DE)\)*DE)\)]; 

    epicycleradius\  = \ 60^2/DK; 
PtolemyForm[epicycleradius]\)

To follow through with Ptolemy's considerations we find the angle between the second eclipse, B, and the moon's apogee, L, by dropping a perpendicular to from the center of the moon's epicycle to the line which joins the observer to the second eclipse. We use this length to work backwards to arcLB.

\(DN\  = \ \((BE/2)\) + DE; 
DNonDK\  = \ DN*120/DK; 

    arcDN\  = \ ChordTableInverse[DNonDK]; 

    arcLB\  = \ 180\  - \ \((arcDN/2)\) - \ \((arcBE/2)\); 

    PtolemyForm[arcLB]\)

The careful reader will have noticed that the preceeding numbers have been, all along, in good agreement with Ptolemy, but it is still gratifying to note that our final figures are remarkably close to Ptolemy's. For the ratio, Ptolemy gives 5;13 where we have 5;13,3; and, for the angle to the apogee, Ptolemy has 12;24 where we find 12;25,29. All this goes to show what no one ever actually doubted; whatever the real means of calculation employed, or commanded, by Ptolemy, they were sufficiently precise.

The Eccentric

Although Ptolemy does not provide the calculations necessary to see the numeric agreement between the two hypotheses in Almagest IV 6, he is aware of this possibility and provides two figures. Now, Theon when he chanced upon this gap, in the course of his Commentary on the Almagest,  felt compelled to fill it. Theon's work has not yet been graced with a modern translation, however, Neugebauer discusses these calculations in the course of a dubious argument concerning the possibility that the equivalence of the hypotheses for the moon goes back to Apollonius of Perga, Neugebauer [1975,  265 - 267]. The reasoning that follows corresponds very closely to what Theon actually puts forward, as found in the commentary, Rome [1931, 1053 - 1060]. 

I will be very brief in laying out Theon's calculations, since the geometric argument follows almost exactly the same reasoning as that found in Ptolemy. The points of departure, however minor, will be noted by blue input.

The observations dictate that the initial givens will be the same, hence the time intervals, the changes in longitude and anomaly, and the arcs on the circle of the moon's orbit will be identical. The first difference is in the angles at which the observer would have seen the eclipses had they all occurred on a single position of the eccentric circle. Now the observer is inside the circle of the moon's orbit and these apparent angles must be much greater. (See fig 4.5 in Toomer [1984, 194].) These angles are found by considering that, if the eclipses had been observed on a single position of the eccentric circle, then they would have appeared to be distant from each other by their actual zodiacal distances less the change in the position of the center of the moon's eccentric circle. The change in the position of the moon's eccentric circle is really just the mean longitude corrected by the anomaly, or the difference between these two.

\(deltacentertheon1 = deltameanlongitude1 - deltaanomaly1; 

    deltacentertheon2 = deltameanlongitude2 - deltaanomaly2; 

    deltatheon1 = 349.25 - deltacentertheon1; 
PtolemyForm[deltatheon1]\)

\(deltatheon2 = 169.5 - deltacentertheon2; 
PtolemyForm[deltatheon2]\)

The apparent angles on a single position of the eccentric are found by allowing the first interval to specify an arbitrary starting point for angular measurements and setting the other intervals relative to this.

\(angleBDAtheon = 360 - deltatheon1; 
PtolemyForm[angleBDAtheon]\)

\(angleADGtheon = deltatheon2 - angleBDAtheon; 

    PtolemyForm[angleADGtheon]\)

\(angleBDGtheon = angleBDAtheon + angleADGtheon; 

    PtolemyForm[angleBDGtheon]\)

The geometry follows Ptolemy's, and these figures are all the same as those given for the epicycle.

angleBEAtheon = arcBA/2;
angleBEGtheon = arcBG/2;
angleAEGtheon = arcAG/2;

angleEAZtheon = angleBDAtheon - angleBEAtheon;
angleEGDtheon = angleBDGtheon - angleBEGtheon;
angleTGEtheon = 90 - angleAEGtheon;

AGtheon  =  ChordTable[arcAG];

In right triangles DEZ and AEZ the geometry is the same although the lengths are different.

\(EZonDEtheon\  = \ RightTriangleSide[angleBDAtheon]; 

    PtolemyForm[EZonDEtheon]\)

\(EZonAEtheon\  = \ RightTriangleSide[angleEAZtheon]; 

    AEonDEtheon\  = \ 120*EZonDEtheon/EZonAEtheon; 

    PtolemyForm[AEonDEtheon]\)

The displacement of D, the observer, dictates a minor change in the geometry for right triangle DEH.

\(EHonDEtheon\  = \ RightTriangleSide[180 - angleBDGtheon]; 

    PtolemyForm[EHonDEtheon]\)

\(EHonGEtheon\  = \ RightTriangleSide[angleEGDtheon]; 

    GEonDEtheon\  = \ 120*EHonDEtheon/EHonGEtheon; 

    PtolemyForm[GEonDEtheon]\)

Finding AG in the same units as DE requires no changes in the geometric reasoning.

\(GTonGEtheon\  = \ RightTriangleSide[angleAEGtheon]; 

    GTonDEtheon\  = \ GEonDEtheon*GTonGEtheon/120; 

    PtolemyForm[GTonDEtheon]\)

\(ETonGEtheon\  = \ RightTriangleSide[90 - angleAEGtheon]; 

    ETonDEtheon\  = \ GEonDEtheon*ETonGEtheon/120; 

    PtolemyForm[ETonDEtheon]\)

\(\(
TAonDEtheon\  = \ \ AEonDEtheon\  - \ ETonDEtheon; 

    PtolemyForm[TAonDEtheon]\)\)

\(AGonDEtheon\  = \ Sqrt[TAonDEtheon^2\  + \ GTonDEtheon^2]; 

    PtolemyForm[AGonDEtheon]\)

All chords are converted to the those units wherein the diameter of the eccentric circle is 120, and BE is found in these units.

\(DEtheon\  = \ 120*AGtheon/AGonDEtheon; 
PtolemyForm[DEtheon]\)

\(GEtheon\  = \ DEtheon*GEonDEtheon/120; 
PtolemyForm[GEtheon]\)

\(\(	arcGEtheon\  = \ ChordTableInverse[GEtheon]; 
	
    arcBEtheon\  = \ arcGEtheon\  + \ arcBG; 

    BEtheon\  = \ ChordTable[arcBEtheon]; 
PtolemyForm[BEtheon]\)\)

A line is dropped perpendicular from the center of the eccentric circle to the line which joins the observer and the second eclipse, and the Pythagorean theorem is used to find the length between the observer and the center of the eccentric circle where the radius of the eccentric circle is 60.

\(DNtheon\  = \ Abs[BEtheon/2 - DEtheon]; 

    KNtheon\  = \ Sqrt[60^2 - \((BEtheon/2)\)^2]; 

    epicycleradiustheon\  = \ Sqrt[DNtheon^2\  + \ KNtheon^2]; 

    PtolemyForm[epicycleradiustheon]\)

The angle between the second eclipse and the apogee of the moon's eccentric circle is found following the same sort of reasoning we used above.

\(DNonDKtheon\  = \ 120*DNtheon/DKtheon; 

    angleDKNtheon\  = \ RightTriangleAngle[DNonDKtheon]; 

    angleBKNtheon\  = \ ChordTableInverse[BEtheon]/2; 

    arcLBtheon\  = \ 180\  - \((\ angleDKNtheon + angleBKNtheon)\); 

    PtolemyForm[arcLBtheon]\)

By these means we find figures somewhat in agreement with Theon's. In all fairness, however, it should be remembered that Theon's intent was to show that the two models are numerically equivalent, so he may have allowed his numbers to slide somewhat in the direction of Ptolemy's. For this ratio he has 5;12,43 which he rounds to 5;13, while we find 5;12,55 which would even more happily round; for the arc he has 12;24 where we find 12;19,29. The hypotheses, then, are very close and they differ only in this:

differenceinratio  =  
        Abs[epicycleradius  -  epicycleradiustheon];
PtolemyForm[differenceinratio]

\(\(differenceinarc\  = Abs[arcLB\  - arcLBtheon]; 

    PtolemyForm[differenceinarc]\ \)\)

Bibliography

Neugebauer and Paderson are have complete discussions of Ptolemy's methods, however, Toomer's introduction is both concise and valuable. Toomer's translation is the best in any language.

• O. Neugebauer, A History of Ancient Mathematical Astronomy, 3 vols. (Berlin  etc.: Springer-Verlag, 1975).

• O. Pedersen, A Survey of the Almagest (Odense University Press, 1974).

• Ptolemy, Ptolemy's Almagest, trans. G. J. Toomer (London: Duckworth, 1984). (Reprinted by Princton, 1998, with some corrections)
	
• Ptolemy, Claudii Ptolemaei Opera quae exstant omnia.Vol. I, Syntaxis Mathematica, ed. J. L Heiberg, 2 vols. (Liepzig: Teubner, 1898, 1903).
		
• M. Abbé A. Rome, ed., Commentaries de Pappus et Théon d'Alexandrie sur l'Almagest (Roma: Biblioteca Apostolica Vaticana, 1931).

Contacting the Author

If you have any questions about, or encounter any errors in, PtolemyChordTable.m please let me know. 

Nathan Sidoli
nathan.sidoli@utoronto.ca