(* ::Package:: *) (******************************************************************* This file was generated automatically by the Mathematica front end. It contains Initialization cells from a Notebook file, which typically will have the same name as this file except ending in ".nb" instead of ".m". This file is intended to be loaded into the Mathematica kernel using the package loading commands Get or Needs. Doing so is equivalent to using the Evaluate Initialization Cells menu command in the front end. DO NOT EDIT THIS FILE. This entire file is regenerated automatically each time the parent Notebook file is saved in the Mathematica front end. Any changes you make to this file will be overwritten. ***********************************************************************) (*:Title: PtolemyChordTable*)(*:Author: Nathan Sidoli nathan.sidoli@utoronto.ca*) (*:Version: 1.1*)(* :Copyright:Copyright 2003, Nathan Sidoli.*) (*:Context:PtolemyChordTable`*)(*:Mathematica Version : 5.0*) (***********************START OF PUBLIC CODE***********************) BeginPackage["PtolemyChordTable`"] PtolemyForm::usage = "PtolemyForm[x] takes an argument in decimal, or rational, form and returns a list of the form {Integer, minute, second, third, fourth, fifth, sixth}." PtolemyFormMod360::usage = "PtolemyFormMod360[x] takes an argument in decimal, or rational, form and returns a list of the form {Mod[integer, 360], minute, second, third, fourth, fifth, sixth}." PtolemyRational::usage = "PtolemyRational[{x}] takes a list and returns a rational number such that the first place is treated as an integer followed by up to six sexagesimal places." ChordTableElement::usage = "ChordTableElement[angle] takes an angle (Mod[angle, 180]) as argument and returns the row in the chord table ({angle, chord, sixtieth}) which would be used to calculate its chord." ChordTableElementInverse::usage = "ChordTableElementInverse[chord] takes a chord (Mod[chord, 120]) as argument and returns the row in the chord table ({angle, chord, sixtieth}) which would be used to calculate its angle." ChordTable::usage = "ChordTable[angle] takes an angle at the center of a circle as argument and returns the length of the chord under the assumption that the diameter of the circle is 120. NB: The angle is taken modulo 180 (Mod[angle, 180]) so a value will always be returned, however, if the argument > 180 this may be meaningless." ChordTableLinear::usage = "ChordTableStraight[angle] is the same as ChordTable[angle] except that the angle is calulated by linear interpolation instead of using Ptolemy's 'sixtiests' column. NB: The angle is taken modulo 180 (Mod[angle, 180]) so a value will always be returned, however, if the argument > 180 this may be meaningless." ChordTableInverse::usage = "ChordTableInverse[chord] takes a chord subtending an angle at the center of a circle as argument and returns the measure of its angle under the assuption that the diameter of the circle is 120. NB: The chord is taken modulo 120 (Mod[angle, 120]) so a value will always be returned." ChordTableInverseLinear::usage = "ChordTableInverseStraight[angle] is the same as ChordTableInverse[angle] except that the chord is calulated by linear interpolation instead of using Ptolemy's 'sixtiests' column. NB: The angle is taken modulo 180 (Mod[angle, 180]) so a value will always be returned, however, if the argument > 180 this may be meaningless." Unprotect[chordsandsixtieths, angles, chords, sixtieths, chordtable, SexagesimalDigit, PtolemyForm, PtolemyRational, ChordTable, ChordTableStraight, ChordTableInverse, ChordTableElement] (***********************START OF PRIVATE CODE***********************) Begin["Private`"] (* These are some basic functions for dealing with Ptolemy's numerical system. *) SexagesimalDigit[x_, d_] := IntegerPart[60*(FractionalPart[x/60^(d + 1)])]; PtolemyForm[x_] := {IntegerPart[x], SexagesimalDigit[x, -1], SexagesimalDigit[x, -2], SexagesimalDigit[x, -3], SexagesimalDigit[x, -4], SexagesimalDigit[x, -5], SexagesimalDigit[x, -6]}; PtolemyFormMod360[x_] := {Mod[IntegerPart[x], 360], SexagesimalDigit[x, -1], SexagesimalDigit[x, -2], SexagesimalDigit[x, -3], SexagesimalDigit[x, -4], SexagesimalDigit[x, -5], SexagesimalDigit[x, -6]}; PtolemyRational[x_] := Which[Length[x]==7, Part[x, 1] + Part[x, 2]/60 + Part[x, 3]/60^2 + Part[x, 4]/60^3 + Part[x, 5]/60^4 + Part[x, 6]/60^5 + Part[x, 7]/60^6, Length[x] == 6, Part[x, 1] + Part[x, 2]/60 + Part[x, 3]/60^2 + Part[x, 4]/60^3 + Part[x, 5]/60^4 + Part[x, 6]/60^5, Length[x] == 5, Part[x, 1] + Part[x, 2]/60 + Part[x, 3]/60^2 + Part[x, 4]/60^3 + Part[x, 5]/60^4, Length[x] == 4, Part[x, 1] + Part[x, 2]/60 + Part[x, 3]/60^2 + Part[x, 4]/60^3, Length[x] == 3, Part[x, 1] + Part[x, 2]/60 + Part[x, 3]/60^2, Length[x] == 2, Part[x, 1] + Part[x, 2]/60, Length[x] == 1, Part[x, 1]]; (* These lists and functions are based on *Almagest* I 11. They provide everything we need to do Ptolemy's trigonometry. *) chordsandsixtieths = {{0/60^0 + 31/60^1 + 25/60^2, 1/60^1 + 2/60^2 + 50/60^3}, {1/60^0 + 2/60^1 + 50/60^2, 1/60^1 + 2/60^2 + 50/60^3}, {1/60^0 + 34/60^1 + 15/60^2, 1/60^1 + 2/60^2 + 50/60^3}, {2/60^0 + 5/60^1 + 40/60^2, 1/60^1 + 2/60^2 + 50/60^3}, {2/60^0 + 37/60^1 + 4/60^2, 1/60^1 + 2/60^2 + 48/60^3}, {3/60^0 + 8/60^1 + 28/60^2, 1/60^1 + 2/60^2 + 48/60^3}, {3/60^0 + 39/60^1 + 52/60^2, 1/60^1 + 2/60^2 + 48/60^3}, {4/60^0 + 11/60^1 + 16/60^2, 1/60^1 + 2/60^2 + 47/60^3}, {4/60^0 + 42/60^1 + 40/60^2, 1/60^1 + 2/60^2 + 47/60^3}, {5/60^0 + 14/60^1 + 4/60^2, 1/60^1 + 2/60^2 + 46/60^3}, {5/60^0 + 45/60^1 + 27/60^2, 1/60^1 + 2/60^2 + 45/60^3}, {6/60^0 + 16/60^1 + 49/60^2, 1/60^1 + 2/60^2 + 44/60^3}, {6/60^0 + 48/60^1 + 11/60^2, 1/60^1 + 2/60^2 + 43/60^3}, {7/60^0 + 19/60^1 + 33/60^2, 1/60^1 + 2/60^2 + 42/60^3}, {7/60^0 + 50/60^1 + 54/60^2, 1/60^1 + 2/60^2 + 41/60^3}, {8/60^0 + 22/60^1 + 15/60^2, 1/60^1 + 2/60^2 + 40/60^3}, {8/60^0 + 53/60^1 + 35/60^2, 1/60^1 + 2/60^2 + 39/60^3}, {9/60^0 + 24/60^1 + 54/60^2, 1/60^1 + 2/60^2 + 38/60^3}, {9/60^0 + 56/60^1 + 13/60^2, 1/60^1 + 2/60^2 + 37/60^3}, {10/60^0 + 27/60^1 + 32/60^2, 1/60^1 + 2/60^2 + 35/60^3}, {10/60^0 + 58/60^1 + 49/60^2, 1/60^1 + 2/60^2 + 33/60^3}, {11/60^0 + 30/60^1 + 5/60^2, 1/60^1 + 2/60^2 + 32/60^3}, {12/60^0 + 1/60^1 + 21/60^2, 1/60^1 + 2/60^2 + 30/60^3}, {12/60^0 + 32/60^1 + 36/60^2, 1/60^1 + 2/60^2 + 28/60^3}, {13/60^0 + 3/60^1 + 50/60^2, 1/60^1 + 2/60^2 + 27/60^3}, {13/60^0 + 35/60^1 + 4/60^2, 1/60^1 + 2/60^2 + 25/60^3}, {14/60^0 + 6/60^1 + 16/60^2, 1/60^1 + 2/60^2 + 23/60^3}, {14/60^0 + 37/60^1 + 27/60^2, 1/60^1 + 2/60^2 + 21/60^3}, {15/60^0 + 8/60^1 + 38/60^2, 1/60^1 + 2/60^2 + 19/60^3}, {15/60^0 + 39/60^1 + 47/60^2, 1/60^1 + 2/60^2 + 17/60^3}, {16/60^0 + 10/60^1 + 56/60^2, 1/60^1 + 2/60^2 + 15/60^3}, {16/60^0 + 42/60^1 + 3/60^2, 1/60^1 + 2/60^2 + 13/60^3}, {17/60^0 + 13/60^1 + 9/60^2, 1/60^1 + 2/60^2 + 10/60^3}, {17/60^0 + 44/60^1 + 14/60^2, 1/60^1 + 2/60^2 + 7/60^3}, {18/60^0 + 15/60^1 + 17/60^2, 1/60^1 + 2/60^2 + 5/60^3}, {18/60^0 + 46/60^1 + 19/60^2, 1/60^1 + 2/60^2 + 2/60^3}, {19/60^0 + 17/60^1 + 21/60^2, 1/60^1 + 2/60^2 + 0/60^3}, {19/60^0 + 48/60^1 + 21/60^2, 1/60^1 + 1/60^2 + 57/60^3}, {20/60^0 + 19/60^1 + 19/60^2, 1/60^1 + 1/60^2 + 54/60^3}, {20/60^0 + 50/60^1 + 16/60^2, 1/60^1 + 1/60^2 + 51/60^3}, {21/60^0 + 21/60^1 + 11/60^2, 1/60^1 + 1/60^2 + 48/60^3}, {21/60^0 + 52/60^1 + 6/60^2, 1/60^1 + 1/60^2 + 45/60^3}, {22/60^0 + 22/60^1 + 58/60^2, 1/60^1 + 1/60^2 + 42/60^3}, {22/60^0 + 53/60^1 + 49/60^2, 1/60^1 + 1/60^2 + 39/60^3}, {23/60^0 + 24/60^1 + 39/60^2, 1/60^1 + 1/60^2 + 36/60^3}, {23/60^0 + 55/60^1 + 27/60^2, 1/60^1 + 1/60^2 + 33/60^3}, {24/60^0 + 26/60^1 + 13/60^2, 1/60^1 + 1/60^2 + 30/60^3}, {24/60^0 + 56/60^1 + 58/60^2, 1/60^1 + 1/60^2 + 26/60^3}, {25/60^0 + 27/60^1 + 41/60^2, 1/60^1 + 1/60^2 + 22/60^3}, {25/60^0 + 58/60^1 + 22/60^2, 1/60^1 + 1/60^2 + 19/60^3}, {26/60^0 + 29/60^1 + 1/60^2, 1/60^1 + 1/60^2 + 15/60^3}, {26/60^0 + 59/60^1 + 38/60^2, 1/60^1 + 1/60^2 + 11/60^3}, {27/60^0 + 30/60^1 + 14/60^2, 1/60^1 + 1/60^2 + 8/60^3}, {28/60^0 + 0/60^1 + 48/60^2, 1/60^1 + 1/60^2 + 4/60^3}, {28/60^0 + 31/60^1 + 20/60^2, 1/60^1 + 1/60^2 + 0/60^3}, {29/60^0 + 1/60^1 + 50/60^2, 1/60^1 + 0/60^2 + 56/60^3}, {29/60^0 + 32/60^1 + 18/60^2, 1/60^1 + 0/60^2 + 52/60^3}, {30/60^0 + 2/60^1 + 44/60^2, 1/60^1 + 0/60^2 + 48/60^3}, {30/60^0 + 33/60^1 + 8/60^2, 1/60^1 + 0/60^2 + 44/60^3}, {31/60^0 + 3/60^1 + 30/60^2, 1/60^1 + 0/60^2 + 40/60^3}, {31/60^0 + 33/60^1 + 50/60^2, 1/60^1 + 0/60^2 + 35/60^3}, {32/60^0 + 4/60^1 + 8/60^2, 1/60^1 + 0/60^2 + 31/60^3}, {32/60^0 + 34/60^1 + 22/60^2, 1/60^1 + 0/60^2 + 27/60^3}, {33/60^0 + 4/60^1 + 35/60^2, 1/60^1 + 0/60^2 + 22/60^3}, {33/60^0 + 34/60^1 + 46/60^2, 1/60^1 + 0/60^2 + 17/60^3}, {34/60^0 + 4/60^1 + 55/60^2, 1/60^1 + 0/60^2 + 12/60^3}, {34/60^0 + 35/60^1 + 1/60^2, 1/60^1 + 0/60^2 + 8/60^3}, {35/60^0 + 5/60^1 + 5/60^2, 1/60^1 + 0/60^2 + 3/60^3}, {35/60^0 + 35/60^1 + 6/60^2, 0/60^1 + 59/60^2 + 57/60^3}, {36/60^0 + 5/60^1 + 5/60^2, 0/60^1 + 59/60^2 + 52/60^3}, {36/60^0 + 35/60^1 + 1/60^2, 0/60^1 + 59/60^2 + 48/60^3}, {37/60^0 + 4/60^1 + 55/60^2, 0/60^1 + 59/60^2 + 43/60^3}, {37/60^0 + 34/60^1 + 47/60^2, 0/60^1 + 59/60^2 + 38/60^3}, {38/60^0 + 4/60^1 + 36/60^2, 0/60^1 + 59/60^2 + 32/60^3}, {38/60^0 + 34/60^1 + 22/60^2, 0/60^1 + 59/60^2 + 27/60^3}, {39/60^0 + 4/60^1 + 5/60^2, 0/60^1 + 59/60^2 + 22/60^3}, {39/60^0 + 33/60^1 + 46/60^2, 0/60^1 + 59/60^2 + 16/60^3}, {40/60^0 + 3/60^1 + 25/60^2, 0/60^1 + 59/60^2 + 11/60^3}, {40/60^0 + 33/60^1 + 0/60^2, 0/60^1 + 59/60^2 + 5/60^3}, {41/60^0 + 2/60^1 + 33/60^2, 0/60^1 + 59/60^2 + 0/60^3}, {41/60^0 + 32/60^1 + 3/60^2, 0/60^1 + 58/60^2 + 54/60^3}, {42/60^0 + 1/60^1 + 30/60^2, 0/60^1 + 58/60^2 + 48/60^3}, {42/60^0 + 30/60^1 + 54/60^2, 0/60^1 + 58/60^2 + 42/60^3}, {43/60^0 + 0/60^1 + 15/60^2, 0/60^1 + 58/60^2 + 36/60^3}, {43/60^0 + 29/60^1 + 33/60^2, 0/60^1 + 58/60^2 + 31/60^3}, {43/60^0 + 58/60^1 + 49/60^2, 0/60^1 + 58/60^2 + 25/60^3}, {44/60^0 + 28/60^1 + 1/60^2, 0/60^1 + 58/60^2 + 18/60^3}, {44/60^0 + 57/60^1 + 10/60^2, 0/60^1 + 58/60^2 + 12/60^3}, {45/60^0 + 26/60^1 + 16/60^2, 0/60^1 + 58/60^2 + 6/60^3}, {45/60^0 + 55/60^1 + 19/60^2, 0/60^1 + 58/60^2 + 0/60^3}, {46/60^0 + 24/60^1 + 19/60^2, 0/60^1 + 57/60^2 + 54/60^3}, {46/60^0 + 53/60^1 + 16/60^2, 0/60^1 + 57/60^2 + 47/60^3}, {47/60^0 + 22/60^1 + 9/60^2, 0/60^1 + 57/60^2 + 41/60^3}, {47/60^0 + 51/60^1 + 0/60^2, 0/60^1 + 57/60^2 + 34/60^3}, {48/60^0 + 19/60^1 + 47/60^2, 0/60^1 + 57/60^2 + 27/60^3}, {48/60^0 + 48/60^1 + 30/60^2, 0/60^1 + 57/60^2 + 21/60^3}, {49/60^0 + 17/60^1 + 11/60^2, 0/60^1 + 57/60^2 + 14/60^3}, {49/60^0 + 45/60^1 + 48/60^2, 0/60^1 + 57/60^2 + 7/60^3}, {50/60^0 + 14/60^1 + 21/60^2, 0/60^1 + 57/60^2 + 0/60^3}, {50/60^0 + 42/60^1 + 51/60^2, 0/60^1 + 56/60^2 + 53/60^3}, {51/60^0 + 11/60^1 + 18/60^2, 0/60^1 + 56/60^2 + 46/60^3}, {51/60^0 + 39/60^1 + 42/60^2, 0/60^1 + 56/60^2 + 39/60^3}, {52/60^0 + 8/60^1 + 0/60^2, 0/60^1 + 56/60^2 + 32/60^3}, {52/60^0 + 36/60^1 + 16/60^2, 0/60^1 + 56/60^2 + 25/60^3}, {53/60^0 + 4/60^1 + 29/60^2, 0/60^1 + 56/60^2 + 18/60^3}, {53/60^0 + 32/60^1 + 38/60^2, 0/60^1 + 56/60^2 + 10/60^3}, {54/60^0 + 0/60^1 + 43/60^2, 0/60^1 + 56/60^2 + 3/60^3}, {54/60^0 + 28/60^1 + 44/60^2, 0/60^1 + 55/60^2 + 55/60^3}, {54/60^0 + 56/60^1 + 42/60^2, 0/60^1 + 55/60^2 + 48/60^3}, {55/60^0 + 24/60^1 + 36/60^2, 0/60^1 + 55/60^2 + 40/60^3}, {55/60^0 + 52/60^1 + 26/60^2, 0/60^1 + 55/60^2 + 33/60^3}, {56/60^0 + 20/60^1 + 12/60^2, 0/60^1 + 55/60^2 + 25/60^3}, {56/60^0 + 47/60^1 + 54/60^2, 0/60^1 + 55/60^2 + 17/60^3}, {57/60^0 + 15/60^1 + 33/60^2, 0/60^1 + 55/60^2 + 9/60^3}, {57/60^0 + 43/60^1 + 7/60^2, 0/60^1 + 55/60^2 + 1/60^3}, {58/60^0 + 10/60^1 + 38/60^2, 0/60^1 + 54/60^2 + 53/60^3}, {58/60^0 + 38/60^1 + 5/60^2, 0/60^1 + 54/60^2 + 45/60^3}, {59/60^0 + 5/60^1 + 27/60^2, 0/60^1 + 54/60^2 + 37/60^3}, {59/60^0 + 32/60^1 + 45/60^2, 0/60^1 + 54/60^2 + 29/60^3}, {60/60^0 + 0/60^1 + 0/60^2, 0/60^1 + 54/60^2 + 21/60^3}, {60/60^0 + 27/60^1 + 11/60^2, 0/60^1 + 54/60^2 + 12/60^3}, {60/60^0 + 54/60^1 + 17/60^2, 0/60^1 + 54/60^2 + 4/60^3}, {61/60^0 + 21/60^1 + 19/60^2, 0/60^1 + 53/60^2 + 56/60^3}, {61/60^0 + 48/60^1 + 17/60^2, 0/60^1 + 53/60^2 + 47/60^3}, {62/60^0 + 15/60^1 + 10/60^2, 0/60^1 + 53/60^2 + 39/60^3}, {62/60^0 + 42/60^1 + 0/60^2, 0/60^1 + 53/60^2 + 30/60^3}, {63/60^0 + 8/60^1 + 45/60^2, 0/60^1 + 53/60^2 + 22/60^3}, {63/60^0 + 35/60^1 + 25/60^2, 0/60^1 + 53/60^2 + 13/60^3}, {64/60^0 + 2/60^1 + 2/60^2, 0/60^1 + 53/60^2 + 4/60^3}, {64/60^0 + 28/60^1 + 34/60^2, 0/60^1 + 52/60^2 + 55/60^3}, {64/60^0 + 55/60^1 + 1/60^2, 0/60^1 + 52/60^2 + 46/60^3}, {65/60^0 + 21/60^1 + 24/60^2, 0/60^1 + 52/60^2 + 37/60^3}, {65/60^0 + 47/60^1 + 43/60^2, 0/60^1 + 52/60^2 + 28/60^3}, {66/60^0 + 13/60^1 + 57/60^2, 0/60^1 + 52/60^2 + 19/60^3}, {66/60^0 + 40/60^1 + 7/60^2, 0/60^1 + 52/60^2 + 10/60^3}, {67/60^0 + 6/60^1 + 12/60^2, 0/60^1 + 52/60^2 + 1/60^3}, {67/60^0 + 32/60^1 + 12/60^2, 0/60^1 + 51/60^2 + 52/60^3}, {67/60^0 + 58/60^1 + 8/60^2, 0/60^1 + 51/60^2 + 43/60^3}, {68/60^0 + 23/60^1 + 59/60^2, 0/60^1 + 51/60^2 + 33/60^3}, {68/60^0 + 49/60^1 + 45/60^2, 0/60^1 + 51/60^2 + 23/60^3}, {69/60^0 + 15/60^1 + 27/60^2, 0/60^1 + 51/60^2 + 14/60^3}, {69/60^0 + 41/60^1 + 4/60^2, 0/60^1 + 51/60^2 + 4/60^3}, {70/60^0 + 6/60^1 + 36/60^2, 0/60^1 + 50/60^2 + 55/60^3}, {70/60^0 + 32/60^1 + 3/60^2, 0/60^1 + 50/60^2 + 45/60^3}, {70/60^0 + 57/60^1 + 26/60^2, 0/60^1 + 50/60^2 + 35/60^3}, {71/60^0 + 22/60^1 + 44/60^2, 0/60^1 + 50/60^2 + 26/60^3}, {71/60^0 + 47/60^1 + 56/60^2, 0/60^1 + 50/60^2 + 16/60^3}, {72/60^0 + 13/60^1 + 4/60^2, 0/60^1 + 50/60^2 + 6/60^3}, {72/60^0 + 38/60^1 + 7/60^2, 0/60^1 + 49/60^2 + 56/60^3}, {73/60^0 + 3/60^1 + 5/60^2, 0/60^1 + 49/60^2 + 46/60^3}, {73/60^0 + 27/60^1 + 58/60^2, 0/60^1 + 49/60^2 + 36/60^3}, {73/60^0 + 52/60^1 + 46/60^2, 0/60^1 + 49/60^2 + 26/60^3}, {74/60^0 + 17/60^1 + 29/60^2, 0/60^1 + 49/60^2 + 16/60^3}, {74/60^0 + 42/60^1 + 7/60^2, 0/60^1 + 49/60^2 + 6/60^3}, {75/60^0 + 6/60^1 + 39/60^2, 0/60^1 + 48/60^2 + 55/60^3}, {75/60^0 + 31/60^1 + 7/60^2, 0/60^1 + 48/60^2 + 45/60^3}, {75/60^0 + 55/60^1 + 29/60^2, 0/60^1 + 48/60^2 + 34/60^3}, {76/60^0 + 19/60^1 + 46/60^2, 0/60^1 + 48/60^2 + 24/60^3}, {76/60^0 + 43/60^1 + 58/60^2, 0/60^1 + 48/60^2 + 13/60^3}, {77/60^0 + 8/60^1 + 5/60^2, 0/60^1 + 48/60^2 + 3/60^3}, {77/60^0 + 32/60^1 + 6/60^2, 0/60^1 + 47/60^2 + 52/60^3}, {77/60^0 + 56/60^1 + 2/60^2, 0/60^1 + 47/60^2 + 41/60^3}, {78/60^0 + 19/60^1 + 52/60^2, 0/60^1 + 47/60^2 + 31/60^3}, {78/60^0 + 43/60^1 + 38/60^2, 0/60^1 + 47/60^2 + 20/60^3}, {79/60^0 + 7/60^1 + 18/60^2, 0/60^1 + 47/60^2 + 9/60^3}, {79/60^0 + 30/60^1 + 52/60^2, 0/60^1 + 46/60^2 + 58/60^3}, {79/60^0 + 54/60^1 + 21/60^2, 0/60^1 + 46/60^2 + 47/60^3}, {80/60^0 + 17/60^1 + 45/60^2, 0/60^1 + 46/60^2 + 36/60^3}, {80/60^0 + 41/60^1 + 3/60^2, 0/60^1 + 46/60^2 + 25/60^3}, {81/60^0 + 4/60^1 + 15/60^2, 0/60^1 + 46/60^2 + 14/60^3}, {81/60^0 + 27/60^1 + 22/60^2, 0/60^1 + 46/60^2 + 3/60^3}, {81/60^0 + 50/60^1 + 24/60^2, 0/60^1 + 45/60^2 + 52/60^3}, {82/60^0 + 13/60^1 + 19/60^2, 0/60^1 + 45/60^2 + 40/60^3}, {82/60^0 + 36/60^1 + 9/60^2, 0/60^1 + 45/60^2 + 29/60^3}, {82/60^0 + 58/60^1 + 54/60^2, 0/60^1 + 45/60^2 + 18/60^3}, {83/60^0 + 21/60^1 + 33/60^2, 0/60^1 + 45/60^2 + 6/60^3}, {83/60^0 + 44/60^1 + 4/60^2, 0/60^1 + 44/60^2 + 55/60^3}, {84/60^0 + 6/60^1 + 32/60^2, 0/60^1 + 44/60^2 + 43/60^3}, {84/60^0 + 28/60^1 + 54/60^2, 0/60^1 + 44/60^2 + 31/60^3}, {84/60^0 + 51/60^1 + 10/60^2, 0/60^1 + 44/60^2 + 20/60^3}, {85/60^0 + 13/60^1 + 20/60^2, 0/60^1 + 44/60^2 + 8/60^3}, {85/60^0 + 35/60^1 + 24/60^2, 0/60^1 + 43/60^2 + 57/60^3}, {85/60^0 + 57/60^1 + 23/60^2, 0/60^1 + 43/60^2 + 45/60^3}, {86/60^0 + 19/60^1 + 15/60^2, 0/60^1 + 43/60^2 + 33/60^3}, {86/60^0 + 41/60^1 + 2/60^2, 0/60^1 + 43/60^2 + 21/60^3}, {87/60^0 + 2/60^1 + 42/60^2, 0/60^1 + 43/60^2 + 9/60^3}, {87/60^0 + 24/60^1 + 17/60^2, 0/60^1 + 42/60^2 + 57/60^3}, {87/60^0 + 45/60^1 + 45/60^2, 0/60^1 + 42/60^2 + 45/60^3}, {88/60^0 + 7/60^1 + 7/60^2, 0/60^1 + 42/60^2 + 33/60^3}, {88/60^0 + 28/60^1 + 24/60^2, 0/60^1 + 42/60^2 + 21/60^3}, {88/60^0 + 49/60^1 + 34/60^2, 0/60^1 + 42/60^2 + 9/60^3}, {89/60^0 + 10/60^1 + 39/60^2, 0/60^1 + 41/60^2 + 57/60^3}, {89/60^0 + 31/60^1 + 37/60^2, 0/60^1 + 41/60^2 + 45/60^3}, {89/60^0 + 52/60^1 + 29/60^2, 0/60^1 + 41/60^2 + 33/60^3}, {90/60^0 + 13/60^1 + 15/60^2, 0/60^1 + 41/60^2 + 21/60^3}, {90/60^0 + 33/60^1 + 55/60^2, 0/60^1 + 41/60^2 + 8/60^3}, {90/60^0 + 54/60^1 + 29/60^2, 0/60^1 + 40/60^2 + 55/60^3}, {91/60^0 + 14/60^1 + 56/60^2, 0/60^1 + 40/60^2 + 42/60^3}, {91/60^0 + 35/60^1 + 17/60^2, 0/60^1 + 40/60^2 + 30/60^3}, {91/60^0 + 55/60^1 + 32/60^2, 0/60^1 + 40/60^2 + 17/60^3}, {92/60^0 + 15/60^1 + 40/60^2, 0/60^1 + 40/60^2 + 4/60^3}, {92/60^0 + 35/60^1 + 42/60^2, 0/60^1 + 39/60^2 + 52/60^3}, {92/60^0 + 55/60^1 + 38/60^2, 0/60^1 + 39/60^2 + 39/60^3}, {93/60^0 + 15/60^1 + 27/60^2, 0/60^1 + 39/60^2 + 26/60^3}, {93/60^0 + 35/60^1 + 11/60^2, 0/60^1 + 39/60^2 + 13/60^3}, {93/60^0 + 54/60^1 + 47/60^2, 0/60^1 + 39/60^2 + 0/60^3}, {94/60^0 + 14/60^1 + 17/60^2, 0/60^1 + 38/60^2 + 47/60^3}, {94/60^0 + 33/60^1 + 41/60^2, 0/60^1 + 38/60^2 + 34/60^3}, {94/60^0 + 52/60^1 + 58/60^2, 0/60^1 + 38/60^2 + 21/60^3}, {95/60^0 + 12/60^1 + 9/60^2, 0/60^1 + 38/60^2 + 8/60^3}, {95/60^0 + 31/60^1 + 13/60^2, 0/60^1 + 37/60^2 + 55/60^3}, {95/60^0 + 50/60^1 + 11/60^2, 0/60^1 + 37/60^2 + 42/60^3}, {96/60^0 + 9/60^1 + 2/60^2, 0/60^1 + 37/60^2 + 29/60^3}, {96/60^0 + 27/60^1 + 47/60^2, 0/60^1 + 37/60^2 + 16/60^3}, {96/60^0 + 46/60^1 + 24/60^2, 0/60^1 + 37/60^2 + 3/60^3}, {97/60^0 + 4/60^1 + 55/60^2, 0/60^1 + 36/60^2 + 50/60^3}, {97/60^0 + 23/60^1 + 20/60^2, 0/60^1 + 36/60^2 + 36/60^3}, {97/60^0 + 41/60^1 + 38/60^2, 0/60^1 + 36/60^2 + 23/60^3}, {97/60^0 + 59/60^1 + 49/60^2, 0/60^1 + 36/60^2 + 9/60^3}, {98/60^0 + 17/60^1 + 54/60^2, 0/60^1 + 35/60^2 + 56/60^3}, {98/60^0 + 35/60^1 + 52/60^2, 0/60^1 + 35/60^2 + 42/60^3}, {98/60^0 + 53/60^1 + 43/60^2, 0/60^1 + 35/60^2 + 29/60^3}, {99/60^0 + 11/60^1 + 27/60^2, 0/60^1 + 35/60^2 + 15/60^3}, {99/60^0 + 29/60^1 + 5/60^2, 0/60^1 + 35/60^2 + 1/60^3}, {99/60^0 + 46/60^1 + 35/60^2, 0/60^1 + 34/60^2 + 48/60^3}, {100/60^0 + 3/60^1 + 59/60^2, 0/60^1 + 34/60^2 + 44/60^3}, {100/60^0 + 21/60^1 + 16/60^2, 0/60^1 + 34/60^2 + 20/60^3}, {100/60^0 + 38/60^1 + 26/60^2, 0/60^1 + 34/60^2 + 6/60^3}, {100/60^0 + 55/60^1 + 28/60^2, 0/60^1 + 33/60^2 + 52/60^3}, {101/60^0 + 12/60^1 + 25/60^2, 0/60^1 + 33/60^2 + 39/60^3}, {101/60^0 + 29/60^1 + 15/60^2, 0/60^1 + 33/60^2 + 25/60^3}, {101/60^0 + 45/60^1 + 57/60^2, 0/60^1 + 33/60^2 + 11/60^3}, {102/60^0 + 2/60^1 + 33/60^2, 0/60^1 + 32/60^2 + 57/60^3}, {102/60^0 + 19/60^1 + 1/60^2, 0/60^1 + 32/60^2 + 43/60^3}, {102/60^0 + 35/60^1 + 22/60^2, 0/60^1 + 32/60^2 + 29/60^3}, {102/60^0 + 51/60^1 + 37/60^2, 0/60^1 + 32/60^2 + 15/60^3}, {103/60^0 + 7/60^1 + 44/60^2, 0/60^1 + 32/60^2 + 0/60^3}, {103/60^0 + 23/60^1 + 44/60^2, 0/60^1 + 31/60^2 + 46/60^3}, {103/60^0 + 39/60^1 + 37/60^2, 0/60^1 + 31/60^2 + 32/60^3}, {103/60^0 + 55/60^1 + 53/60^2, 0/60^1 + 31/60^2 + 18/60^3}, {104/60^0 + 11/60^1 + 2/60^2, 0/60^1 + 31/60^2 + 4/60^3}, {104/60^0 + 26/60^1 + 34/60^2, 0/60^1 + 30/60^2 + 49/60^3}, {104/60^0 + 41/60^1 + 59/60^2, 0/60^1 + 30/60^2 + 35/60^3}, {104/60^0 + 57/60^1 + 16/60^2, 0/60^1 + 30/60^2 + 21/60^3}, {105/60^0 + 12/60^1 + 26/60^2, 0/60^1 + 30/60^2 + 7/60^3}, {105/60^0 + 27/60^1 + 30/60^2, 0/60^1 + 29/60^2 + 52/60^3}, {105/60^0 + 42/60^1 + 26/60^2, 0/60^1 + 29/60^2 + 37/60^3}, {105/60^0 + 57/60^1 + 14/60^2, 0/60^1 + 29/60^2 + 23/60^3}, {106/60^0 + 11/60^1 + 55/60^2, 0/60^1 + 29/60^2 + 8/60^3}, {106/60^0 + 26/60^1 + 29/60^2, 0/60^1 + 28/60^2 + 54/60^3}, {106/60^0 + 40/60^1 + 56/60^2, 0/60^1 + 28/60^2 + 39/60^3}, {106/60^0 + 55/60^1 + 15/60^2, 0/60^1 + 28/60^2 + 24/60^3}, {107/60^0 + 9/60^1 + 27/60^2, 0/60^1 + 28/60^2 + 10/60^3}, {107/60^0 + 23/60^1 + 32/60^2, 0/60^1 + 27/60^2 + 56/60^3}, {107/60^0 + 37/60^1 + 30/60^2, 0/60^1 + 27/60^2 + 40/60^3}, {107/60^0 + 51/60^1 + 20/60^2, 0/60^1 + 27/60^2 + 25/60^3}, {108/60^0 + 5/60^1 + 2/60^2, 0/60^1 + 27/60^2 + 10/60^3}, {108/60^0 + 18/60^1 + 37/60^2, 0/60^1 + 26/60^2 + 56/60^3}, {108/60^0 + 32/60^1 + 5/60^2, 0/60^1 + 26/60^2 + 41/60^3}, {108/60^0 + 45/60^1 + 25/60^2, 0/60^1 + 26/60^2 + 26/60^3}, {108/60^0 + 58/60^1 + 38/60^2, 0/60^1 + 26/60^2 + 11/60^3}, {109/60^0 + 11/60^1 + 44/60^2, 0/60^1 + 25/60^2 + 56/60^3}, {109/60^0 + 24/60^1 + 42/60^2, 0/60^1 + 25/60^2 + 41/60^3}, {109/60^0 + 37/60^1 + 32/60^2, 0/60^1 + 25/60^2 + 26/60^3}, {109/60^0 + 50/60^1 + 15/60^2, 0/60^1 + 25/60^2 + 11/60^3}, {110/60^0 + 2/60^1 + 50/60^2, 0/60^1 + 24/60^2 + 56/60^3}, {110/60^0 + 15/60^1 + 18/60^2, 0/60^1 + 24/60^2 + 41/60^3}, {110/60^0 + 27/60^1 + 39/60^2, 0/60^1 + 24/60^2 + 26/60^3}, {110/60^0 + 39/60^1 + 52/60^2, 0/60^1 + 24/60^2 + 10/60^3}, {110/60^0 + 51/60^1 + 57/60^2, 0/60^1 + 23/60^2 + 55/60^3}, {111/60^0 + 3/60^1 + 54/60^2, 0/60^1 + 23/60^2 + 40/60^3}, {111/60^0 + 15/60^1 + 44/60^2, 0/60^1 + 23/60^2 + 25/60^3}, {111/60^0 + 27/60^1 + 26/60^2, 0/60^1 + 23/60^2 + 9/60^3}, {111/60^0 + 39/60^1 + 1/60^2, 0/60^1 + 22/60^2 + 54/60^3}, {111/60^0 + 50/60^1 + 28/60^2, 0/60^1 + 22/60^2 + 39/60^3}, {112/60^0 + 1/60^1 + 47/60^2, 0/60^1 + 22/60^2 + 24/60^3}, {112/60^0 + 12/60^1 + 59/60^2, 0/60^1 + 22/60^2 + 8/60^3}, {112/60^0 + 24/60^1 + 3/60^2, 0/60^1 + 21/60^2 + 53/60^3}, {112/60^0 + 35/60^1 + 0/60^2, 0/60^1 + 21/60^2 + 37/60^3}, {112/60^0 + 45/60^1 + 48/60^2, 0/60^1 + 21/60^2 + 22/60^3}, {112/60^0 + 56/60^1 + 29/60^2, 0/60^1 + 21/60^2 + 7/60^3}, {113/60^0 + 7/60^1 + 2/60^2, 0/60^1 + 20/60^2 + 51/60^3}, {113/60^0 + 17/60^1 + 25/60^2, 0/60^1 + 20/60^2 + 36/60^3}, {113/60^0 + 27/60^1 + 44/60^2, 0/60^1 + 20/60^2 + 20/60^3}, {113/60^0 + 37/60^1 + 54/60^2, 0/60^1 + 20/60^2 + 4/60^3}, {113/60^0 + 47/60^1 + 56/60^2, 0/60^1 + 19/60^2 + 49/60^3}, {113/60^0 + 57/60^1 + 50/60^2, 0/60^1 + 19/60^2 + 33/60^3}, {114/60^0 + 7/60^1 + 37/60^2, 0/60^1 + 19/60^2 + 17/60^3}, {114/60^0 + 17/60^1 + 15/60^2, 0/60^1 + 19/60^2 + 2/60^3}, {114/60^0 + 26/60^1 + 46/60^2, 0/60^1 + 18/60^2 + 46/60^3}, {114/60^0 + 36/60^1 + 9/60^2, 0/60^1 + 18/60^2 + 30/60^3}, {114/60^0 + 45/60^1 + 24/60^2, 0/60^1 + 18/60^2 + 14/60^3}, {114/60^0 + 54/60^1 + 31/60^2, 0/60^1 + 17/60^2 + 59/60^3}, {115/60^0 + 3/60^1 + 30/60^2, 0/60^1 + 17/60^2 + 43/60^3}, {115/60^0 + 12/60^1 + 22/60^2, 0/60^1 + 17/60^2 + 27/60^3}, {115/60^0 + 21/60^1 + 6/60^2, 0/60^1 + 17/60^2 + 11/60^3}, {115/60^0 + 29/60^1 + 41/60^2, 0/60^1 + 16/60^2 + 55/60^3}, {115/60^0 + 38/60^1 + 9/60^2, 0/60^1 + 16/60^2 + 40/60^3}, {115/60^0 + 46/60^1 + 29/60^2, 0/60^1 + 16/60^2 + 24/60^3}, {115/60^0 + 54/60^1 + 40/60^2, 0/60^1 + 16/60^2 + 8/60^3}, {116/60^0 + 2/60^1 + 44/60^2, 0/60^1 + 15/60^2 + 52/60^3}, {116/60^0 + 10/60^1 + 40/60^2, 0/60^1 + 15/60^2 + 36/60^3}, {116/60^0 + 18/60^1 + 28/60^2, 0/60^1 + 15/60^2 + 20/60^3}, {116/60^0 + 26/60^1 + 8/60^2, 0/60^1 + 15/60^2 + 4/60^3}, {116/60^0 + 33/60^1 + 40/60^2, 0/60^1 + 14/60^2 + 48/60^3}, {116/60^0 + 41/60^1 + 4/60^2, 0/60^1 + 14/60^2 + 32/60^3}, {116/60^0 + 48/60^1 + 20/60^2, 0/60^1 + 14/60^2 + 16/60^3}, {116/60^0 + 55/60^1 + 28/60^2, 0/60^1 + 14/60^2 + 0/60^3}, {117/60^0 + 2/60^1 + 28/60^2, 0/60^1 + 13/60^2 + 44/60^3}, {117/60^0 + 9/60^1 + 20/60^2, 0/60^1 + 13/60^2 + 28/60^3}, {117/60^0 + 16/60^1 + 4/60^2, 0/60^1 + 13/60^2 + 12/60^3}, {117/60^0 + 22/60^1 + 40/60^2, 0/60^1 + 12/60^2 + 56/60^3}, {117/60^0 + 29/60^1 + 8/60^2, 0/60^1 + 12/60^2 + 40/60^3}, {117/60^0 + 35/60^1 + 28/60^2, 0/60^1 + 12/60^2 + 24/60^3}, {117/60^0 + 41/60^1 + 40/60^2, 0/60^1 + 12/60^2 + 7/60^3}, {117/60^0 + 47/60^1 + 43/60^2, 0/60^1 + 11/60^2 + 51/60^3}, {117/60^0 + 53/60^1 + 39/60^2, 0/60^1 + 11/60^2 + 35/60^3}, {117/60^0 + 59/60^1 + 27/60^2, 0/60^1 + 11/60^2 + 19/60^3}, {118/60^0 + 5/60^1 + 7/60^2, 0/60^1 + 11/60^2 + 3/60^3}, {118/60^0 + 10/60^1 + 37/60^2, 0/60^1 + 10/60^2 + 47/60^3}, {118/60^0 + 16/60^1 + 1/60^2, 0/60^1 + 10/60^2 + 31/60^3}, {118/60^0 + 21/60^1 + 16/60^2,0/60^1 + 10/60^2 + 14/60^3}, {118/60^0 + 26/60^1 + 23/60^2, 0/60^1 + 9/60^2 + 58/60^3}, {118/60^0 + 31/60^1 + 22/60^2, 0/60^1 + 9/60^2 + 42/60^3}, {118/60^0 + 36/60^1 + 13/60^2, 0/60^1 + 9/60^2 + 25/60^3}, {118/60^0 + 40/60^1 + 55/60^2, 0/60^1 + 9/60^2 + 9/60^3}, {118/60^0 + 45/60^1 + 30/60^2, 0/60^1 + 8/60^2 + 53/60^3}, {118/60^0 + 49/60^1 + 56/60^2, 0/60^1 + 8/60^2 + 37/60^3}, {118/60^0 + 54/60^1 + 15/60^2, 0/60^1 + 8/60^2 + 20/60^3}, {118/60^0 + 58/60^1 + 25/60^2, 0/60^1 + 8/60^2 + 4/60^3}, {119/60^0 + 2/60^1 + 26/60^2, 0/60^1 + 7/60^2 + 48/60^3}, {119/60^0 + 6/60^1 + 20/60^2, 0/60^1 + 7/60^2 + 31/60^3}, {119/60^0 + 10/60^1 + 6/60^2, 0/60^1 + 7/60^2 + 15/60^3}, {119/60^0 + 13/60^1 + 44/60^2, 0/60^1 + 6/60^2 + 59/60^3}, {119/60^0 + 17/60^1 + 13/60^2, 0/60^1 + 6/60^2 + 42/60^3}, {119/60^0 + 20/60^1 + 34/60^2, 0/60^1 + 6/60^2 + 26/60^3}, {119/60^0 + 23/60^1 + 47/60^2, 0/60^1 + 6/60^2 + 10/60^3}, {119/60^0 + 26/60^1 + 52/60^2, 0/60^1 + 5/60^2 + 53/60^3}, {119/60^0 + 29/60^1 + 49/60^2, 0/60^1 + 5/60^2 + 37/60^3}, {119/60^0 + 32/60^1 + 37/60^2, 0/60^1 + 5/60^2 + 20/60^3}, {119/60^0 + 35/60^1 + 17/60^2, 0/60^1 + 5/60^2 + 4/60^3}, {119/60^0 + 37/60^1 + 49/60^2, 0/60^1 + 4/60^2 + 48/60^3}, {119/60^0 + 40/60^1 + 13/60^2, 0/60^1 + 4/60^2 + 31/60^3}, {119/60^0 + 42/60^1 + 28/60^2, 0/60^1 + 4/60^2 + 14/60^3}, {119/60^0 + 44/60^1 + 35/60^2, 0/60^1 + 3/60^2 + 58/60^3}, {119/60^0 + 46/60^1 + 35/60^2, 0/60^1 + 3/60^2 + 42/60^3}, {119/60^0 + 48/60^1 + 26/60^2, 0/60^1 + 3/60^2 + 26/60^3}, {119/60^0 + 50/60^1 + 8/60^2, 0/60^1 + 3/60^2 + 9/60^3}, {119/60^0 + 51/60^1 + 43/60^2, 0/60^1 + 2/60^2 + 53/60^3}, {119/60^0 + 53/60^1 + 10/60^2, 0/60^1 + 2/60^2 + 36/60^3}, {119/60^0 + 54/60^1 + 27/60^2, 0/60^1 + 2/60^2 + 20/60^3}, {119/60^0 + 55/60^1 + 38/60^2, 0/60^1 + 2/60^2 + 3/60^3}, {119/60^0 + 56/60^1 + 39/60^2, 0/60^1 + 1/60^2 + 47/60^3}, {119/60^0 + 57/60^1 + 32/60^2, 0/60^1 + 1/60^2 + 30/60^3}, {119/60^0 + 58/60^1 + 18/60^2, 0/60^1 + 1/60^2 + 14/60^3}, {119/60^0 + 58/60^1 + 55/60^2, 0/60^1 + 0/60^2 + 57/60^3}, {119/60^0 + 59/60^1 + 24/60^2, 0/60^1 + 0/60^2 + 41/60^3}, {119/60^0 + 59/60^1 + 44/60^2, 0/60^1 + 0/60^2 + 25/60^3}, {119/60^0 + 59/60^1 + 56/60^2, 0/60^1 + 0/60^2 + 9/60^3}, {120/60^0 + 0/60^1 + 0/60^2, 0/60^1 + 0/60^2 + 0/60^3}}; angles = Table[i, {i, .5, 180, .5}]; chords = Table[ Extract[chordsandsixtieths, {i, 1}], {i, Length[chordsandsixtieths]}]; sixtieths = Table[(Extract[chordsandsixtieths, {i, 2}])*60, {i, Length[chordsandsixtieths]}]; chordtable = Table[Prepend[chordsandsixtieths[[i]], angles[[i]]], {i, Length[chordsandsixtieths]}]; ChordTableElement[x_] := If[x == 180, {{angles[[360]]}, Take[PtolemyForm[chords[[360]]], 3], Take[PtolemyForm[sixtieths[[360]]], 4]}, Module[{place}, For[i = 1, angles[[i]] <= Mod[x, 180], i++, place = i]; {{angles[[place]]}, Take[PtolemyForm[chords[[place]]], 3], Take[PtolemyForm[sixtieths[[place]]], 4]}]] ChordTableElementInverse[x_] := If[x == 120, {{angles[[360]]}, Take[PtolemyForm[chords[[360]]], 3], Take[PtolemyForm[sixtieths[[360]]], 4]}, Module[{place}, For[i = 1, chords[[i]] <= Mod[x, 120], i++, place = i]; {{angles[[place]]}, Take[PtolemyForm[chords[[place]]], 3], Take[PtolemyForm[sixtieths[[place]]], 4]}]] ChordTable[x_] := Which[x == 180, 120, x < .5, x, x >= .5, Module[{a, b, c, place}, For[i = 1, angles[[i]] <= Mod[x, 180], i++, place = i; a = chords[[place]]; b = ((Mod[x, 180] - angles[[place]]))*sixtieths[[place]]; c = N[a + b]]; c]] ChordTableLinear[x_] := Which[x == 180, 120, x < .5, x, x >= .5, Module[{a, b, c, place}, For[i = 1, angles[[i]] <= Mod[x, 180], i++, place = i; a = chords[[place]]; b = (chords[[place + 1]]-chords[[place]])* (Mod[x, 180] - angles[[place]])/.5; c = N[a + b]]; c]] ChordTableInverse[x_] := Which[x == 120, 180, x < .5, x, x >= .5, Module[{a, b, c, place}, For[i = 1, chords[[i]] <= Mod[x, 120], i++, place = i; a = angles[[place]]; b = ((Mod[x, 120] - chords[[place]])/sixtieths[[place]]); c = N[a + b]]; c]] ChordTableInverseLinear[x_] := Which[x == 120, 180, x < .5, x, x >= .5, Module[{a, b, c, place}, For[i = 1, chords[[i]] <= Mod[x, 120], i++, place = i; a = angles[[place]]; b = .5*(Mod[x, 120] - chords[[place]])/(chords[[place + 1]] - chords[[place]]); c = N[a + b]]; c]] End[]; Protect[chordsandsixtieths, angles, chords, sixtieths, chordtable, SexagesimalDigit, PtolemyForm, PtolemyRational, ChordTable, ChordTableStraight, ChordTableInverse, ChordTableElement] EndPackage[];