Version 79 of Stonehenge Circle Accuracy Slot Calculator Example

Updated 2011-06-16 13:26:47 by gold

Stonehenge Circle Accuracy Slot Calculator Example

This page is under development. Comments are welcome, but please load any comments in the comments section at the middle of the page. Thanks,gold


gold Here is an eTCL script on to estimate Stonehenge Circle Accuracy. For the push buttons, the recommended procedure is push testcase and fill frame, change entries , push solve, and then push report. Report allows copy and paste from console, but takes away from computer "efficiency".


The accuracy of Stonehenge is essentially the delta or divergence between the poles over the line of sight distance. For a simple circle of aligned poles, the line of sight distance is treated as the diameter. Later circles or more complex monuments had added causeways to the original line of sight. So the calculator has a causeway length added, if not zero. While the testcases below are in meters, the units cancel out in the accuracy equation. So the units could entered as inches, feet, cubits, or chinese inches. This is an advantage since the units in the ancient Sumerian, Indian, and Chinese texts are open to question. Two or three angular points are needed at a minimum for the divergence, so doorways, doorposts, postholes, columns, and windows measures are usable. Note that the solar and lunar disks have an apparent diameter of 0.5 degrees, so the Stonehenge resolution or accuracy of 0.5 degrees might be expected.

 pseudocode: accuracy  =  delta (divergence)    over the line of sight distance
 pseudocode: accuracy in radians  =  atan (  delta   over the line of sight distance )
 pseudocode: accuracy in degrees = (180. degrees / pi radians)  * atan(ratio)
 pseudocode: load results into answer fields

For most numerical programs, an important work is assembling the testcases, using hand calculators and results of other computer programs. With the TCL console, it is easy enough to write little test programs or demos of the equations or algorithms used.

Testcase 1

 Stonehenge phase1, Audrey holes.
quantitynumberunits
diameter114meters
pole divergence1meters
answer.009radians
answer.5degrees

2900 and 2600 bc

Testcase 2

buried Wooden circle , adjacent and possibly contemporary to Stonehenge 2.

quantitynumberunits
diameter75meters
pole divergence1meters
answer.01radians
answer.76degrees

Testcase 3

   Conjectures on world wide, not many as well preserved or documented as Stonehenge.
quantity
stone circle/structurediameterunitspole separationunitsaccuracyunitswebsite
Stonehenge phase1, Audrey holes114meters1meters.5degreeshttp://en.wikipedia.org/wiki/Stone_Henge
Wooden circle,Stonehengephase275meters1.meters.76degreeshttp://en.wikipedia.org/wiki/Stone_Henge
Goodaver,Bodmin Moor,Cornwall32.3meters3.7meters6.53degreeshttp://en.wikipedia.org/wiki/Goodaver_stone_circle
Grey Wethers,Dartmoor32meters4.5meters8.0degreeshttp://en.wikipedia.org/wiki/Grey_Wethers
Ring of Brogar,Orkney,scotland103.7meters0.8297meters0.458degreeshhttp://en.wikipedia.org/wiki/Ring_of_Brodgar

Screenshots Section

http://img690.imageshack.us/img690/4333/stonetclwiki.gif

   due to size and attribution of following jpegs, leaving them as point and shoot
   world wide

Comments Section Please place any comments here, Thanks.

Note, compare the visual style of this new page you have created to other wiki pages on this wiki. Notice how your pages are not in keeping with the high standards of formatting and presentation on the remainder of this wiki. To be a good community member, you should also strive to maintain the existing high quality standards for formatting and presentation as presented on the remainder of this wiki. To do otherwise makes yourself, and the whole wiki community, look bad.

You can read the Formatting Rules page for details on how to format your submissions, and you can look at existing page formatting for clues as to how something was done. You can even look at some of your own pages that have been reformatted to see how to make the necessary changes.

gold With respect, I have pretty printed my TCL code from the ased editor, what is free and available on the PC for a recognized TCL format. If you have got a mechanized css format like google and most editors, I'll be happy to print from that. eg. http://google-code-prettify.googlecode.com/svn/trunk/README.html http://code.google.com/chrome/devtools/docs/elements-styles.html The Ased output is at least referenced on the wiki style page, if not blessed. Ref the discussion on Tcl Style Guide.

Thank you. Your code at the bottom of this page is neatly formatted, as is your wiki page itself now, both of which are very welcome changes. A few tips:

  1. If you surround your code blocks with a pair of line containing only six equals signs ("======") with the first equals sign beginning in the very first column, the wiki will also automatically apply syntax highlighting to your code block for you.
  2. It is conventional on the Tcl'ers wiki to refer to internal wiki pages by title alone, which can be automatically made into a link by single square bracketing the title of the page, and not by placing the explicit URL into the wiki page. I.e., do this: "[Tcl Style Guide]" instead of this "Tcl Style Guide, http://wiki.tcl.tk/708 ".
  3. Beginning a set of lines with three spaces, an asterisk, and a space with the first space beginning in the very first column, will cause the wiki to automatically generate a bulleted list for you. In your references section such can be used to good effect to list external urls.
  4. Much of the wiki formatting commands operate by being placed at the start of a line. Take for example your "****Appendix Code****" title just below. If you edit that line to remove all of the leading spaces, then the four asterisks will function properly and produce a proper title line, rather than a fixed width font block.

One tip, when using the "======" syntax highlighting format operator, you need to put a line at both the start and at the end of the code block, i.e.:

 ======
   proc something { x } {
     set y [ process $x ]
   }
 ======

Leaving out the ending "======" causes everything to not work correctly. I added the missing "======" at the bottom of your code block below so the categories operator would format properly.

What is your purpose in binding the motion event on your main window to execute the wm title command. I.e., this line:

 bind . <Motion> {wm title . "Stonehenge Circle Accuracy Calculator "}

The result of that binding is that every time you move the mouse, the "wm title" subcommand is called repeatedly. To set the window title, you just need to call "wm title . title" once, not on every event update upon mouse pointer motion.


References:

Appendix Code

appendix TCL programs and scripts

*************

Pretty Print VERSION


        # pretty print from autoindent and ased editor
        # stonehenge circle equation
        # written on Windowws XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI , 10sep2010
        package require Tk
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        
        set names {{} {diameter meters:} {pole separation} {causeway length} {not used:} {not used:} {not used} {answer radians:} { answer 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 Stonehenge Circle Accuracy.
            from TCL WIKI,
            written on eTCL "
            
            tk_messageBox -title "About" -message $msg
        }
         proc pi {} {expr acos(-1)}
         proc circle5 { xx1   } {
            global side1 side2 side3
            global side4 side5 side6 side7 side8
            set term1 0
            set term2 0
            set term3 0
            set current 0
            
            set tanratio [expr { $side2/($side1+$side3) }]
            
            set acc  [ expr {   atan($tanratio) +.00000000001 } ]
            set side7 $acc
            set acc  [ expr { (180./[pi])*$acc} ]
            set side8 $acc
            return $side8
        }
        
        proc calculate {     } {
            global colorwarning
            global colorback
            global answer2   answer3
            global side1 side2 side3 side4 side5 side6 side7 side8
            set answer2 5
            
            set answer2  [ circle5  $side8     ]
            
            set side8 $answer2
            
        }
        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 side6 side7 side8
            console show;
            puts " $side1     "
            puts " $side2    "
            puts " $side3    "
            puts " $side4    "
            puts " $side5    "
            puts " $side6    "
            puts " $side7    "
            puts " $side8    "
            puts "answer   $side8 "
        }
        
        frame .buttons -bg aquamarine4
        
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 114. 1. 0.  1. 1. 1.   .008 .5 }
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 75. 1. 0.  1. 1. 1.   .01 .7 }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 114. 1. 0.  1. 1. 1.   .008 .5 }
        ::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 . "Stonehenge Circle Accuracy Calculator "