Babylonian Shadow Lengths & Angles and eTCL Slot Calculator Demo Example

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER in your comment with the same courtesy that I will give you. Its very hard to reply intelligibly without some background of the correspondent. Thanks,gold


gold Here is some eTCL starter code for calculating gradient and tangent angles from the Old Babylonian coefficient tables. The impetus for these calculations was the gnomon instructions tablets. Most of the testcases involve replicas or models, using assumptions and rules of thumb.

The eTCL calculator is estimating the gradient and tangent angles from integer ratios, especially those from the coefficient tables, Babylonian shadow length tables (Mul Apin), and gnomon instructions tablets. In pseudocode, each angle is $kay*atan($N1/$N2), where N1&N2 are integers and N1 > N2. Some analysts believe the Babylonian gnomon was 1 cubit high ( 0.5 meter ) in the Mul Apin, but the length of the gnomon is not explicitly stated or obvious in the available texts. As an intermediate step, the eTCL calculator can be used to calculate a table of tangent angles.

In the Old Babylonian coefficient tables, the 7 readable gradients in a set are 1/7, 1/6, 1/5, 1/4, 1/3, 1/2, and 2/3. There are unreadable lines before and after the set of readable gradients. In other texts, there is a math problem that calls for a 1 cubit vertical decline in a cubit horizontal distance (1/1), equivalent to a tangent angle of 45 degrees.

There are several tablets that deal with the predictions for the length of the gnomon shadow over the day, including the Mul Apin and the gnomon instructions tablets. For the lunar eclipse predictions, the Babylonian astronomers reported the eclipses or potential eclipses as time periods after sunrise or time periods before sunset. The duration of day or the day1/day2 ratio could be used in a corrective factor as <main eclipse prediction> + kay*<corrective factor>. From the Mul Apin, the previously known corrective ratio 2:3 was used for shortest day over longest day for the year (near Babylon). Using the day/night ratios, the Babylonian astronomers developed a piecewise solution to a nonlinear problem. Although not completely understood, some elements of the gnomon instructions tablets appear to be followup on the day/night duration predictions and the eclipse correction factor.

In the gnomon instructions tablets, there are a number of terms that need resolution. There is handuhhu of the Cancer (month 4) and handuhhu of the capricorn (month 10). In other contexts, handuhhu has meant lock part or rooster spur. Also, handuhhu same was used for the boundary? of the heavens. In astrology terms, arrow, Su. kak-si-di, or Su. gag.si.sa was used to designate month 5 (or star Sirius). Another astrologic term in the gnomon instructions, mar-du or mar-tu was used to designate month 5 as Perseus. Its possible that handuhhu or mar-tu refers to the border or end of month 4. In later astronomy definitions, the constellation Cancer or month 4 extended 30 degrees, and if the center of Cancer is the center of the gnomon shadow chart, the bounds of Cancer would extend plus or minus 15 degrees of center.

The initial instructions are to brick up on the left and right of the stone (gnomon?) which suggested building a temporary support.

Pseudocode and Equations

  area = [* length width ] # square meters

Table 1,


Testcases Section

In planning any software, it is advisable to gather a number of testcases to check the results of the program. The math for the testcases can be checked by pasting statements in the TCL console. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the capacity functions (subroutines).

Testcase 1


Screenshots Section

figure 1.

http://s26.postimg.org/ut7k3972x/sun_shadow_calculator_TCL_WIKI.png

figure 2.

http://s26.postimg.org/xop8nv0gp/day_length_babylon_TCL_WIKI.png

figure 3.

http://s26.postimg.org/70y8rq521/time_shadow_marks_TCL_WIKI.png

figure 4.

http://s26.postimg.org/4ati89xqx/fallen_curve_shadows_TCL_WIKI.png


References:

  • Babylonian Astronomy, LIS BRACK-BERNSEN AND JOHN M. STEELE†
  • Celestial Measurement in Babylonian Astronomy J. M. Steele, 13 Jun 2007
  • Lunar Eclipse Astronomy,Kristian Peder Moesgaard,August 2011

Appendix Code

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor
        # sun angle calculator
        # written on windows XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI , 14jun2014
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} {master length centimeters:} }
        lappend names {N1  integer:}
        lappend names {N2  integer: }
        lappend names {angle from N1/N2 ratio degrees: }
        lappend names {answer: angle 2 degrees}
        lappend names {angle 3 degrees:}
        lappend names {angle 4 degrees: }
        lappend names {angle 5 degrees: }
        foreach i {1 2 3 4 5 6 7 8} {
        label .frame.label$i -text [lindex $names $i] -anchor e
        entry .frame.entry$i -width 35 -textvariable side$i
        grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 }
        proc about {} {
        set msg "Calculator for sun angles 
            from TCL WIKI,
            written on eTCL "
            tk_messageBox -title "About" -message $msg }
        proc pi {} {expr 1.*acos(-1)}  
        proc radianstodegconst {} {return [/ 180. [pi] ] }
        proc xradianstodegconst {} {return [/ [pi] 180. ] }
        proc degz {} {return [/ 180. [pi]  ]}
        proc degx {aa} {return [ expr { [degz]*atan($aa) }  ]}
            proc calculate {     } {
            global answer2
            global side1 side2 side3 side4 side5
            global side6 side7 side8 testcase_number 
            incr testcase_number
            set $side1 [* $side1 1. ]
            set $side2 [* $side2 1. ]
            set $side3 [* $side3 1. ]
            set $side4 [* $side4 1. ]
            set N1 $side2
            set N2 $side3
            set length0 $side1
            set term1 [/ 1. 7. ]
            set term2 [/ 1. 6. ]
            set term3 [/ 1. 5. ]
            set term4 [/ 1. 4. ]
            set term5 [/ 1. 3. ]
            set term7 [/ $N1 $N2 ]
            set angle1 [ degx $term7 ]
            set angle2 [ degx $term2 ]
            set angle3 [ degx $term3 ]
            set angle4 [ degx $term4 ]
            set angle5 [ degx $term5 ]
            set side4 $angle1
            set side5 $angle2
            set side6 $angle3  
            set side7 $angle4 
            set side8 $angle5 
            }
        proc fillup {aa bb cc dd ee ff gg hh} {
            .frame.entry1 insert 0 "$aa"
            .frame.entry2 insert 0 "$bb"
            .frame.entry3 insert 0 "$cc"
            .frame.entry4 insert 0 "$dd"
            .frame.entry5 insert 0 "$ee"
            .frame.entry6 insert 0 "$ff"
            .frame.entry7 insert 0 "$gg"
            .frame.entry8 insert 0 "$hh"}
        proc clearx {} {
            foreach i {1 2 3 4 5 6 7 8} {
                .frame.entry$i delete 0 end } }
        proc reportx {} {
            global side1 side2 side3 side4 side5
            global side6 side7 side8 testcase_number 
            console show;
            puts "%|table| printed in|TCL WIKI format |% "
            puts "&|testcase number:| $testcase_number| |& "
            puts "&|shadow 1,  master length:| $side1| |& "
            puts "&|shadow N1 integer: |$side2| |& "
            puts "&|shadow N2 integer: |$side3| |& "
            puts "&|alternate angle from N1/N2 ratio: | $side4| |& "
            puts "&|angle 2, degrees: |$side5| |& "
            puts "&|angle 3, degrees: |$side6| |& "
            puts "&|angle 4, degrees: |$side7| |& "
            puts "&|angle 5, degrees: |$side8| |& "
            puts "&| 1/7 ratio | [ degx [/ 1. 7. ] ]|degrees | |& "
            puts "&| 1/6 ratio | [ degx [/ 1. 6. ] ]|degrees | |& "
            puts "&| 1/5 ratio | [ degx [/ 1. 5. ] ]|degrees | |& "
            puts "&| 1/4 ratio | [ degx [/ 1. 4. ] ]|degrees | |& "
            puts "&| 1/3 ratio | [ degx [/ 1. 3. ] ]|degrees | |& "
            puts "&| 1/2 ratio | [ degx [/ 1. 2. ] ]|degrees | |& "
            puts "&| 2/3 ratio | [ degx [/ 2. 3. ] ]|degrees | |& "
            }
         frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 100. 1. 2.  26.8 9.5  11.3 14.0 18.4 }
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 40. 1.  9.   6.34 9.5  11.3 14.0 18.4 }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 100. 1. 12.  4.76 9.5  11.3 14.0 18.4 }
        ::ttk::button .clearallx -text clear -command {clearx }
        ::ttk::button .about -text about -command about
        ::ttk::button .cons -text report -command { reportx }
        ::ttk::button .exit -text exit -command {exit}
        pack .calculator  -in .buttons -side top -padx 10 -pady 5
        pack  .clearallx .cons .about .exit .test4 .test3 .test2   -side bottom -in .buttons
        grid .frame .buttons -sticky ns -pady {0 10}
        . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30
        wm title . "Sun Angle Calculator "            

Pushbutton Operation

For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console.

For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers (which numbers will be cleared on the next solve button.) The command { calculate; reportx } or { calculate ; reportx; clearx } can be added or changed to report automatically. Another wrinkle would be to print out the current text, delimiters, and numbers in a TCL wiki style table as

  puts " %| testcase $testcase_number | value| units |comment |%"
  puts " &| volume| $volume| cubic meters |based on length $side1 and width $side2   |&"  

gold This page is copyrighted under the TCL/TK license terms, this license .

Comments Section

Please place any comments here, Thanks.