*** Starter Wiki Page ***

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 and date in your comment with the same courtesy that I will give you. Aside from your courtesy, your wiki MONIKER and date as a signature and minimal good faith of any internet post are the rules of this TCL-WIKI. Its very hard to reply reasonably without some background of the correspondent on his WIKI bio page. Thanks, [gold] 12Feb2020
----
Title: Biology >> Dinosaur Mass from Trackway and TCL demo example calculator, numerical analysis

<<TOC>>

***Preface***
[gold]12Feb2020.  Here are some calculations using TCL expressions on estimating Dinosaur Mass from Trackway. 
----
***Introduction***
The rule of thumb is that hip height equals expr ( foot_length * 5. )
  
---- 
*** Calculator Usage***
As as alternate way of using the calculator 

*** Expressions into TCL. ***

----
***Testcases are important in development of TCL programs. ***

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). 

----
***Conclusions*** 

By inspection
----
*** Table 1:   Tables***

----
*** Table 2: Tables ***


---- 

----
***Testcases Section***  
----
**** Testcase 1 **** 
%|table 1 |printed in| tcl format|% 
&| quantity| value| comment, if any|& 
&| 1 :|testcase_number | |&
&| 25000000.0 :|mutation rate years (1/N):  |   |&
&| 5000.0 :|number of females:   | |& 
&| 5.0 :|offspring per female: | |& 
&| 1700000.0 :|geologic interval years:  | |&
&| 1000.0 :|mutation years: | |&
&| 1000.0 :|mutation years: |  |&
&| 1000.0 :|mutation years: |  |&
&| 1700.0 :|mutations per geologic interval: |  |&

----

**** Testcase 2 ****
----
%|table 2 |printed in| tcl format|% 
&| quantity| value| comment, if any|& 
&| 2 :|testcase_number | |&
&| 20000000.0 :|mutation rate years (1/N):  |   |&
&| 7000.0 :|number of females:   | |& 
&| 5.0 :|offspring per female: | |& 
&| 600000.0 :|geologic interval years:  | |&
&| 1000.0 :|mutation years: | |&
&| 571.428 :|mutation years: |  |&
&| 571.428 :|mutation years: |  |&
&| 1050.0 :|mutations per geologic interval: |  |&
----
**** Testcase 3 ****
----
%|table 3 |printed in| tcl format|% 
&| quantity| value| comment, if any|& 
&| 3 :|testcase_number | |&
&| 10000000.0 :|mutation rate years (1/N):  |   |&
&| 9000.0 :|number of females:   | |& 
&| 5.0 :|offspring per female: | |& 
&| 800000.0 :|geologic interval years:  | |&
&| 1000.0 :|mutation years: | |&
&| 222.222 :|mutation years: |  |&
&| 222.222 :|mutation years: |  |&
&| 3600.0 :|mutations per geologic interval: |  |&
----


 
----
***Screenshots Section***
**** figure 1. Calculator Screenshot ****
[Biological Mutation Rate and TCL calculator screenshot]
**** figure 2. Console Screenshot ****
[Biological Mutation Rate and TCL demo example calculator printout]
----
***References:***
   * https://www.researchgate.net/figure/A-Diagram-showing-the-relationships-between-footprint-length-pace-length-pace_fig4_236019686
   * McNeil Alexander's Analysis of Animal Running
   * https://www.sjsu.edu/faculty/watkins/alexander.htm
   * startpage search engine <Sene Carroll >
   * TCL-WIKI search engine < biology >  
   * On S.N. Bernstein’s derivation of Mendel’s Law
   * and ‘rediscovery’ of the Hardy-Weinberg distribution
   * Alan Stark and Eugene Seneta, University of Sydney
   * https://www.history.com/news/worlds-biggest-t-rex-canada-scotty-dinosaur
   * Hardy-Weinberg Equilibrium Model, by Dennis O'Neil 
   * Nonplantigrade Foot Posture: A Constraint on Dinosaur Body Size
   * Tai Kubo1*, Mugino O. Kubo, The University Museum, The University of Tokyo,
   * A NEW METHOD TO CALCULATE ALLOMETRIC LENGTH-MASS RELATIONSHIPS OF DINOSAURS
   * FRANK SEEBACHER, Source: Journal of Vertebrate Paleontology, 21(1):51-60. 2001.  
   * http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.462.255&rep=rep1&type=pdf
   * in rock pocket mouse populations,hhmi
   * Mendelian Proportions in a Mixed Population, Hardy,
   * Trinity College, 1908
   * The physics of dinosaurs, The Physics Teacher 28, 364 (1990);
   * Robert H. Evans 
   * https://www.livescience.com/7068-biggest-carnivore-dinosaur-history-rewritten.html
   * Wikipedia, https://en.wikipedia.org/wiki/Dinosaur_size
   * Dinosaur biomechanics, R. McNeill Alexander*
   * https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1634776/
   * Pubmed search >> https://www.ncbi.nlm.nih.gov/pmc/?term=dinosaur  <<
   * UC Davis Library, the California State University 

----
***Pseudocode & Equations Section*** 
======
    more than one formula for 1) calculator shell
    hip_height equals expr { foot_length * 5. }
    relative_stride_length = [ expr { $stride_length/$hip_height} ]
    dim_speed = [ expr {0.5*$actual_speed/(10.*$hip_height)}]
======
----
**Appendix Code**
*** Trial  Code     ***
======
        # TCL source code follows
        # pretty print from autoindent and ased editor
        # Biological Dinosaur Trackway Mass calculator V2
        # written on Windows XP on TCL
        # working under TCL version 8.6
        # gold on TCL Club, 12Feb2020
        package require Tk
        package require math::numtheory
        namespace path {::tcl::mathop ::tcl::mathfunc math::numtheory }
        set tcl_precision 17
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} {Dinosaur foot length meters ( N) :} }
        lappend names {stride length meters:}
        lappend names {test: }
        lappend names {test : }
        lappend names {hip height meters:}
        lappend names {test: }
        lappend names {test: }
        lappend names {test: }
        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 Biological Dinosaur Trackway Mass
            from TCL
            # gold on TCL Club, 12Dec2019 "
            tk_messageBox -title "About" -message $msg }
        proc self_help {} {
            set msg " Biological Dinosaur Trackway Mass V2
            from TCL ,
            # self help listing
            # problem, Biological Dinosaur Trackway Mass V2
            # 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 to conventional texteditor.
            # For testcases, the
            # testcase number is internal to the calculator and
            # will not be printed until the report button is pushed
            # for the current result numbers.
            # >>> copyright notice <<<
            # This posting, screenshots, and TCL source code is
            # copyrighted under the TCL/TK license terms.
            # Editorial rights and disclaimers
            # retained under the TCL/TK license terms
            # and will be defended as necessary in court.
            Conventional text editor formulas or
            grabbed from internet
            screens can be pasted into green console.
            # gold on  TCL Club, 12Feb2020 "
            tk_messageBox -title "Self_Help" -message $msg }
        proc calculate {     } {
            global side1 side2 side3 side4 side5
            global side6 side7 side8
            global testcase_number
            incr testcase_number
            set side1 [* $side1 1. ]
            set side2 [* $side2 1. ]
            set side3 [* $side3 1. ]
            set side4 [* $side4 1. ]
            set side5 [* $side5 1. ]
            set side6 [* $side6 1. ]
            set side7 [* $side7 1. ]
            set side8 [* $side8 1. ]
            set foot_length $side1
            set hip_height [* $side1 5. ]
            set actual_speed 2.
            set stride_length 2.
            set relative_stride_length [ expr $stride_length/$hip_height ]
            set dim_speed [ expr 0.5*$actual_speed/(10.*$hip_height)]
            set side5 [* $side1 5. ]
            set side6 1.
            set side7 1.
            set side8 1.
        }
        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
            global testcase_number
            console eval {.console config -bg palegreen}
            console eval {.console config -font {fixed 20 bold}}
            console eval {wm geometry . 40x20}
            console eval {wm title . " Biological Dinosaur Trackway Mass Report V2, screen grab and paste from console 2 to texteditor"}
            console eval {. configure -background orange -highlightcolor brown -relief raised -border 30}
            console show;
            puts "%|table $testcase_number |printed in| tcl format|% "
            puts "&| quantity| value| comment, if any|& "
            puts "&| $testcase_number :|testcase_number | |&"
            puts "&| $side1 :|Dinosaur foot length meters (N):  |   |&"
            puts "&| $side2 :|test:   | |& "
            puts "&| $side3 :|test: | |& "
            puts "&| $side4 :|test:  | |&"
            puts "&| $side5 :|hip height meters: | |&"
            puts "&| $side6 :|test: |  |&"
            puts "&| $side7 :|test: |  |&"
            puts "&| $side8 :|test: |  |&"
        }
        frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { set side8 0 ; calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 1. 1. 1. 1.   1. 1. 1. 1. }
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup .5 1. 1. 1. 1. 1. 1. 1. }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup .1 1. 1. 1.  1. 1. 1. 1. }
        ::ttk::button .clearallx -text clear -command {clearx }
        ::ttk::button .about -text about -command {about}
        ::ttk::button .self_help -text self_help -command { self_help }
        ::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  .self_help .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 . "Biological Dinosaur Trackway Mass Calculator V2"  

======
----
 
----
 
----[gold]12Feb2020.  This page is copyrighted under the TCL/TK license terms, [http://tcl.tk/software/tcltk/license.html%|%this license].
 Disclaimers: This page, screenshots, and TCL source code is copyrighted under the TCL/TK license terms. Editorial rights and disclaimers retained under the TCL/TK license terms and will be defended as necessary in court. 

**Hidden Comments Section**

<<discussion>>
Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Thanks, [gold] 12Feb2020 

                              
----
<<categories>> Numerical Analysis | Toys | Calculator | Mathematics| Example| Toys and Games | Games | Application | GUI
----
<<categories>> Development | Concept| Algorithm | Biology