***Chinese Sun Stick Accuracy for Console 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 sign your user-name with the same courtesy that I will give you. Thanks,[gold] <> **Introduction** ---- [gold] Here is an eTCL script on Chinese Sun Stick Accuracy. I have modified a console program in eTCL to handle calculations for Sun Stick Accuracy. The sun stick is called a gnomon in the west and a gui-baio in China. There are a number of issues that have risen with the accuracy of the sun stick. In the west, the gnomon was primarily used in the sundial, hence the issue is the accuracy of keeping time with the sundial. In China, the sun stick was used originally in creating the Chinese calendar, in marking and orienting building and towns, and then in map making for the empire. Sun sticks are still being made in classrooms around the world to estimate latitude and the circumference of the earth. ---- In planning any software, it is advisable to gather a number of testcases to check the results of the program. For the sun stick, these cases represent a diverse lot spanning the globe and several thousand years of history. Shadow diffusion or shadow blur is a problem in the larger gnonoms. The large gnonom at Jaipur has a shadow blur of 100 mm. The solar disk has a apparent size of 0.5 degree and edge instruments will have an inherent error due to the extended light source. However, the large gnonom at Jaipur, the Duofeng-Xian instrument, and other Yuan period gui-biao instruments had special pointing needles, metal reticles, pinhole cameras, mathematical averaging of the results, and other gismos to alleviate the shadow diffusion. Also, the perpendicular geometry of the gnonom has to be correct and the shadow table level. <
> **Table Sunsticks** %|name,location |period(CE) |height|units |table |units |length<
>uncertaincy|est. accuracy from<
>eTCL program|% |Dengfeng-Xian,Henan,china |1279 |12.62|meters |31.196|meters |2mm |.05 percent | |Gui-biao,Beijing,china |1279 |1.96 |meters |6.72 |meters |2mm |.265 | |2 m. stick,Han period,china |100 |2. |meters |6.7 |meters |4mm |6. | |meter stick, france etc |2010 |1.0 |meters |0.84 |meters |5mm |4.5 | |cyclon churinga tally stone, NSW,Australia |20000 to 30000BCE |0.20 |meters |0.18 |meters |4mm |8.8 | |cyclon churinga tally stone, NSW,Australia |20000 to 30000BCE |.120 |meters |0.1 |meters |4mm |15.8| |Jantar Mantar,Jaipur,India |1730 |27. |meters |44.? |meters |50mm |0.25 | |Thutmosis Obelisk, Karnak |-1493 |21.3 |meters |72.4? |meters |200mm? |2.5 | |Hatshepsut Obelisk, Karnak |-1460 |26.9 |meters |91.5?|meters |200mm? |2.0 | |Temple of Sun,Teotihuacan |200 |71.2 |meters |900? |meters |200mm? |.6 percent? | |Tical Temple, Mexico |400 |47 |meters |250? |meters |200mm? |1.02 percent?| ---- Chinese Han text. Arithmetic Classic of the Gnomon and the Circular Paths of Heaven reported triangle as follows. 60000 li, 24948 km, 15502.2miles 80000 li, 33264 km, reputed altitude of sun, 100000 li ,41580km, reputed distance from measuring stick to sun Chinese li was 0.4158 km (0.25837 miles) in Han times. Modern li is 0.5 km. 2* babylonian 12709 =25418 On gnomons, height translates into accuracy of latitude measurement or year measurement. Chinese sun/pole star angles of 12 meters +- 2millimeters. For example inferred tangent accuracy from gnomon might be height of gnomon over length of ( shadow +- 2 millimeters). Within reason, the higher the temple or pyramid gnomon and longer the step path, the more accurate the gnomon and measurement of year. That is why the Mayans et al built temples with "two towers" on top. ---- In China, Guo Shoujing of Yuan dynasty built a remarkably large gnonom in 1279CE. Gnomon are called gui-biao in china. After checking the figures of the large gnomon, an error analysis program for estimating the error or sun angle was written as a console script in eTCL The biao or gnomon head was 12.62 meters, The gui or horizontal measurement table was 128 chi or 31.196 meters. From the dimensions of Guo's large gnomon, the worst case accuracy was ====== pseudocode:((12.62m +-2mm) / (31.196 +-2mm) pseudocode:(12.62m -2mm) / (31.196 +2mm)> 12.62/31198.> 0.312481569 pseudocode:(12.62m +2mm) / (31.196 -2mm) > 12620/31194.> 0.4046550 pseudocode: 22.0309 deg versus 22.0220deg, diff 0.00886 deg circumference=distance between points*360/angular separation ====== As a check from non-TCL sources, Guo calculated the tropical year to be 365.2425 days and the reported error of winter solstice was 0.01 day. (Meaning the stick calculations here do not take into account multiple measurements and averaging techniques.) Other gnomons were built during the Yuan era in China. The heads in China were 8 chi or 1.96 meters. The gui or horizontal tray were about 6.72 meters. Presumably the measurement error was still about 2 mm. ---- The chief formula that came from the Han Chinese was "cun qian li" , one cun per sun stick for 1000 li. This formula relates distance on earth to change in the length of the sun stick's shadow at noon. Expressed in modern terms, the modern constant would be 40068 km /360 degrees or 111.3 km per degree, based on the earth's circumference of 40,068 km. Unfortunately, the stick measures seem to have changed since Han times. On the Han maps, there are distances given between cities, source not given. For the modern li of 0.5 kilometers, the modern constant would be 222.6 li per degree. Based on the sunstick calculator, 2-5 percent accuracy would about what could be expected from a Han sunstick. Taking half the solar disk as the upper bound on accuracy(eg. 0.25 degree), the upper bound on the unaided sunstick would be about [[(45+.25)/(45-.25)]-1.]*100. or 1 percent. ---- During the Tang dynasty, astronomers Tang Yixing and Nangong Yue found that one degree latitude was about 129.2 kilometers in modern units. Given the Tang findings, the earth's circumference would be 360 degrees times 129.2 kilometers per degree or 46512 kilometers. The latitudes were measured over a range of 51 deg. north to 17 deg. north (713-741 CE). ---- '''Comments Section''' Please place any comments here, Thanks. ---- ***References:*** * http://www.schoyencollection.com/religionsLiving.html * http://en.wikipedia.org/wiki/Tjurunga * http://www.duckdigital.net/FOD/FOD1051.html ---- ****Appendix Code**** ****appendix TCL programs and scripts **** ---- ****Pretty Print VERSION**** ====== # pretty print version from ased autoindent # estimating errors for sun angles # code from TCL WIKI, eTCL console script # 6Aug2010, [gold] console show package require Tk proc errorx {aa bb} { expr { $aa > $bb ? (($aa*1.)/$bb -1.)*100. : (($bb*1.)/$aa -1.)*100.} } proc degtoradiansconst {} { return [ expr {180./[pi]} ] } proc degz {} { return [ expr {180./[pi]} ] } proc degx {aa} { return [ expr { [degz]*atan($aa) } ] } proc pi {} { expr acos(-1) } proc gm { aa bb cc } { set side1 [ expr { ($aa+$cc*1.)/( $bb-$cc*1.)} ] set side2 [ expr { ($aa-$cc*1.)/( $bb+$cc*1.)} ] set side3 [ errorx $side1 $side2 ] set angle1 [ degx $side1 ] set angle2 [ degx $side2 ] set anglediff [ expr { abs($angle1 - $angle2) } ] puts "$aa height in mm " puts "$bb width in mm " puts "$cc length error in mm " puts "$side1 ratio 1 " puts "$side2 ratio 2 " puts "$angle1 tan 1 in deg" puts "$angle2 tan 2 in deg " puts "$anglediff diff tans in deg " puts "$side3 percent error " } gm 1960 6270 2 gm 9746.8 31196 2 ====== ---- **Output results, Gui-biao,Beijing,china** ====== Results of Gui-biao,Beijing,china gm 1960 6270 2#entry 1960 height in mm 6270 width in mm 2 length error in mm 0.31301850670070197 ratio 1 0.3121811224489796 ratio 2 17.381085802796047 tan 1 in deg 17.337378262554374 tan 2 in deg 0.043707540241673115 diff tans in deg 0.26823667144038055 percent error ====== ---- **Output results, Dengfeng-Xian,Henan,china ** ====== Results of Dengfeng-Xian,Henan,china gm 9746.8 31196 2 #entry 9746.8 height in mm 31196 width in mm 2 length error in mm 0.3125216387766878 ratio 1 0.3123533559843579 ratio 2 17.355154136448714 tan 1 in deg 17.34636974983224 tan 2 in deg 0.00878438661647607 diff tans in deg 0.05387577533768617 percent error ====== ---- **Output results,2 meter stick, Han period, china ** ====== 2 meter stick, Han period, china gm 2000. 6700. 4. 2000. height in mm 6700. width in mm 4. length error in mm 0.2992831541218638 ratio 1 0.2977326968973747 ratio 2 16.661555846393263 tan 1 in deg 16.579989346694116 tan 2 in deg 0.08156649969914653 diff tans in deg 0.5207547711911342 percent error ====== ---- **Output results,Results of Jantar Mantar,Jaipur,India ** ====== Results of Jantar Mantar,Jaipur,India gm 27000. 44000. 50. #entry 27000. height in mm 44000. width in mm 50. length error in mm 0.6154721274175199 ratio 1 0.6118047673098751 ratio 2 31.6111389190154 tan 1 in deg 31.458493577435057 tan 2 in deg 0.15264534158034238 diff tans in deg 0.5994330713979812 percent error ====== ---- **Output results, Thutmosis Obelisk ** ====== Results of Thutmosis Obelisk, Karnak gm 21300. 72400. 200. #entry 21300. height in mm 72400. width in mm 200. length error in mm 0.29778393351800553 ratio 1 0.290633608815427 ratio 2 16.58268591135137 tan 1 in deg 16.205640202759085 tan 2 in deg 0.37704570859228426 diff tans in deg 2.4602539024038084 percent error ====== ---- **Output results, Hatshepsut Obelisk ** ====== Results of Hatshepsut Obelisk, Karnak gm 26900. 91500. 200. #entry 26900. height in mm 91500. width in mm 200. length error in mm 0.2968236582694414 ratio 1 0.29116684841875684 ratio 2 16.532134418606983 tan 1 in deg 16.23380886586711 tan 2 in deg 0.2983255527398718 diff tans in deg 1.942806978680811 percent error ====== ---- **Output results, Temple of Sun ** ====== Results of Temple of Sun, Teotihuacan site, Mexico gm 71200. 894000. 200. #entry 71200. height in mm 894000. width in mm 200. length error in mm 0.07988364287312598 ratio 1 0.07940058152538582 ratio 2 4.5672968223805075 tan 1 in deg 4.539793893821857 tan 2 in deg 0.027502928558650552 diff tans in deg 0.6083851509144367 percent error ====== ---- **Output results, Tikal Temple ** ====== Results of Tikal Temple, Tikal site, Mexico gm 47000. 250000. 200. #entry 47000. height in mm 250000. width in mm 200. length error in mm 0.188951160928743 ratio 1 0.18705035971223022 ratio 2 10.699955707141847 tan 1 in deg 10.594765712337136 tan 2 in deg 0.1051899948047108 diff tans in deg 1.0161975734433781 percent error ====== ---- **Combo entries ** ====== combo entries gm 12620. 31196 2 gm 1960 6270 2 gm 2000. 6700. 4. gm 1000. 84. 5. gm 27000. 44000. 50. gm 21300. 72400. 200. gm 26900. 91500. 200. gm 71200. 894000. 200. gm 47000. 250000. 200. ====== ---- ***Prose & Code Scraps*** [gold] Indian formula from sanscript is aksajya=(triya*chaya)/karna or lambaka=(triya*sanku)/karna Testcase 1. %|quantity|sanscript|number|units|% &| R.sine latitude | aksajya| 0.|radians|& &| radius|triya | .0|none|& &| shadow|chaya | 0|none|& &| hypotenuse |karna |0 |none|& &| R.cosine latitude|lambaka| 0|none|& &| pole height|sanku|0 |none|& &| triangle|Trikonasana|0|none|& Han chinese formula is solar height = distance/(shadow1/pole-shadow2/pole) [gold] This page is copyrighted under the TCL/TK license terms, [http://tcl.tk/software/tcltk/license.html%|%this license]. **Comments Section** <> Please place any comments here, Thanks. <> Numerical Analysis | Toys | Calculator | Example | Mathematics