*** Crater Production Power Law 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 crater production on other planets. The crater production rate is used to estimate the geologic age of planet surface. 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. ---- In planning any software, there is a need to develop testcases. The cum. number of craters per unit area (=>D) equals alpha times the diameter to the log factor (power law). %|quantity|crater diameter|units|log factor|alpha constant|answer|units|% &|"Testcase1"| 100. |kilometers|-2.5 |.1 | ans 1E-6|cum.no.per km*km |& &|"Testcase2"| 10. |kilometers|-2. |.1 | ans .001 |cum.no.per km*km|& &|"Testcase3" |1000. |kilometers|-2.5 |.1| ans 3E-9|cum.no.per km*km |& ---- ---- ***ScreenShots Section:*** [Crater Production Power Law Slot Calculator Example screen.png] ---- ***References:*** * http://en.wikipedia.org/wiki/Impact_crater * http://www.terrapub.co.jp/journals/EPS/pdf/2008/6004/60040265.pdf * http://www.diss.fuberlin.de/diss/servlets/MCRFileNodeServlet/FUDISS_derivate_000000001959/12_W_chap11.pdf * http://www.psi.edu/research/isochrons/chron04b.html * http://www.lpi.usra.edu/books/AsteroidsIII/pdf/3025.pdf * CRATERING RECORDS IN THE INNER SOLAR SYSTEM IN RELATION TO THE LUNAR REFERENCE SYSTEM by G. NEUKUM1, B.A. IVANOV2 and W.K. HARTMANN3 ---- ****appendix TCL programs and scripts **** ****FIRST VERSION *** ====== # cumulative crater equation # written on Windowws XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 24aug2010 frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {crater diameter:} { log factor:} {alpha constant :} {not used:} {not used:} {not used:} {not used:} { answer:} } 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 cumulative crater Equation. from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc intelligent5 { xx1 } { global side1 side2 side3 global side4 side5 side6 side7 side8 set side8 [ expr { 1*$side1*$side2*$side3*$side4*$side5*$side6*$side7 } ] set side8 [ expr { 1*$side3*pow($side1,$side2) } ] 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 [ intelligent5 $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 " $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 100. -2.5 .1 1. 1. 1. 1. 1E-6} ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 10. -2. .1 1. 1. 1. 1. .001 } ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 1000. -2.5 .1 1. 1. 1. 1. 3E-9 } ::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 . "Cumulative Crater Equation Calculator " ====== ---- **Comments Section** Please place any comments here, Thanks. <> You have the following statement in almost all of your pages: : Report allows copy and paste from console, but takes away from computer "efficiency". What do you mean by "takes away from computer 'efficiency'" in the context of allowing copy/paste? How do you see allowing copy/paste as "taking away computer efficiency"? <> Numerical Analysis | Toys | Calculator | Example | Mathematics