Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Example+Linear++Interpolation+Calculator?V=16
QUERY_STRINGV=16
CONTENT_TYPE
DOCUMENT_URI/revision/Example+Linear++Interpolation+Calculator
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.179.85
REMOTE_PORT40902
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.22.61.246
HTTP_CF_RAY876f11067d6a630c-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP3.22.61.246
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {Example Linear  Interpolation Calculator} { 
**Example Linear Interpolation Calculator**

----   
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] 17Jul2010
 Here is some starter code for Example Linear Interpolation Calculator
 written in eTCL. This eTCL script calls on
 console show, which can act funny on other TCL interpreters. 
----


   For the report button,
   the linear interpolation function takes 
   two known points on a line and
   solves for an intermediate point.
   The points are xx1,yy1   xx2,yy2 and xx3,?yy3?
   The input order of the five items
   is xx1 yy1 xx2 yy2 xx3 
   and solving for ?yy3?.
   The interpolation function loaded as
   proc pol. User should be able to write
   pol 50. 1000. 200. 1200.  150.
   and save answer (1133.3)  on console.






     ---- 




      

      
----
   ----
    ----
  
     
 ----
  





 



----

 
----
**Screenshots Section**




[http://farm5.static.flickr.com/4118/4803438156_b62e060e8b.jpg] 




----
**Comments Section**
         Please place any comments here, Thanks.

[gold] Changes.

 
======

----
**References***

  

http://wiki.tcl.tk/672


Windows wish console


http://wiki.tcl.tk/786


http://wiki.tcl.tk/788





http://wiki.tcl.tk/11339
Straightforward interpolation methods


http://www.eng.fsu.edu/~dommelen/courses/eml3100/aids/intpol/index.html
http://faculty.ksu.edu.sa/11843/interpolation/Linear-interpolation12-14-06.pdf

http://www.stat.uiowa.edu/ftp/atkinson/ENA_Materials/Overheads/sec_4-2.pdf



http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/interpolation/




  
**appendix TCL programs**



***FIRST VERSION*** 
       #start of deck
       #start of deck
      #start of deck
      #start of deck
       frame .frame -relief flat -bg aquamarine4
      pack .frame -side top -fill y -anchor center

    set names {{} x1: y1: {x3:} {y3:} {x2:} {answer:} possible:}
   foreach i {1 2 3 4 5 6 } {
    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 linear interpolation.
          from TCL WIKI,
          written on eTCL "
    
    tk_messageBox -title "About" -message $msg
 }
     proc pi {} {expr acos(-1)}
   
   proc interlinear { xx1 yy1 xx3 yy3 xx2   } {
     return [expr {  ((($xx2-$xx1)*($yy3-$yy1))/($xx3-$xx1))+ $yy1 } ] ;}

    proc pol { xx1 yy1 xx3 yy3 xx2   } {
     return [expr {  ((($xx2-$xx1)*($yy3-$yy1))/($xx3-$xx1))+ $yy1 } ] ;}


    proc calculate {     } {
    global colorwarning
    global colorback
    global answer2   answer3
    global side1 side2 side3 side4 side5 side6 
       set answer2 ""
   
   
   set answer2  [ interlinear  $side1 $side2 $side3 $side4 $side5  ] 

   set side6 $answer2  

   
      set pi5 [pi]
   if {$answer2 >= $pi5} { set error5   [expr {100.*$answer2/$pi5-100.}]   }
   if {$answer2 <= $pi5} { set error5   [expr {100.*$pi5/$answer2-100.}]   }
   #$x insert 1.0 " % error $error5 " 
   #$t insert 1.0 " % error  $error5 "


 }
      proc fillup {aa bb cc dd ee ff } {
    
    .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 "
   
}

 

      proc clearx {} {
    foreach i {1 2 3 4 5 6 } {
        .frame.entry$i delete 0 end
    }
    }

   proc reportx {} { 
   console show;
   puts "
   The interpolation function takes 
   two know points on a line and
   solves for an intermediate point.
   The points are xx1,yy1   xx2,yy2 and xx3,?yy3?
   The input order of the five items
   is xx1 yy1 xx2 yy2 xx3 
   and solving for ?yy3?.
   The interpolation function loaded as
   proc pol. User should be able to write
   pol 50. 1000. 200. 1200.  150.
   and save answer (1133.3)  on console."
   }


  frame .buttons -bg aquamarine4

    
    ::ttk::button .calculator -text "Solve" -command { calculate   }

    ::ttk::button .test2 -text "Testcase1" -command { clearx;fillup 10. 100. 60. 120.  50. 116 }
    ::ttk::button .test3 -text "Testcase2" -command { clearx;fillup  50. 1000. 200. 1200.  150. 1133 }
    ::ttk::button .test4 -text "Testcase3" -command { clearx;fillup 200. 1000. 300. 1500.  250. 1250}
    ::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
    bind . <Motion> {wm title . "Linear Interpolation Calculator"}

   #end of deck
    #end of deck
      #end of deck
      #end of deck      
      #end of deck
    #end of deck







======

****SECOND VERSION WITH ADDED HACKS *** 



     #start of deck
       #start of deck
      #start of deck
      #start of deck


    set colorgrd seashell4
 set colorback bisque
 set colorwarning tomato1
    frame .frame -relief flat -bg aquamarine4
     pack .frame -side top -fill y -anchor center

    set names {{} x1: y1: {x3:} {y3:} {x2:} {answer:} possible:}
   foreach i {1 2 3 4 5 6 } {
    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 linear interpolation.
          from TCL WIKI"
    
    tk_messageBox -title "About" -message $msg
    }
     proc pi {} {expr acos(-1)}
   
   proc interlinear { xx1 yy1 xx3 yy3 xx2   } {
     return [expr {  ((($xx2-$xx1)*($yy3-$yy1))/($xx3-$xx1))+ $yy1 } ] ;}

    proc calculate {     } {
    global colorwarning
    global colorback
    global answer2   answer3
    global side1 side2 side3 side4 side5 side6 
       set answer2 ""
   
   
   set answer2  [ interlinear  $side1 $side2 $side3 $side4 $side5  ] 

   set side6 $answer2  

   
      set pi5 [pi]
   if {$answer2 >= $pi5} { set error5   [expr {100.*$answer2/$pi5-100.}]   }
   if {$answer2 <= $pi5} { set error5   [expr {100.*$pi5/$answer2-100.}]   }
   #$x insert 1.0 " % error $error5 " 
   #$t insert 1.0 " % error  $error5 "


     }
    proc fillup {aa bb cc dd ee ff } {
 
    .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 "
   
      }

 

     proc clearx {} {
    foreach i {1 2 3 4 5 6 } {
        .frame.entry$i delete 0 end
    }
     }


  frame .buttons -bg aquamarine4

    
    ::ttk::button .calculator -text "Solve" -command { calculate   }

    ::ttk::button .test2 -text "Testcase1" -command { clearx;fillup 10. 100. 60. 120.  50. 116 }
    ::ttk::button .test3 -text "Testcase2" -command { clearx;fillup  50. 1000. 200. 1200.  150. 1133 }
    ::ttk::button .test4 -text "Testcase3" -command { clearx;fillup 200. 1000. 300. 1500.  250. 1250}
    ::ttk::button .clearallx -text clear -command {clearx  }
    ::ttk::button .about -text about -command about
    ::ttk::button .exit -text exit -command {exit}
    pack .calculator  -in .buttons -side top -padx 10 -pady 5
     
    pack  .clearallx .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
    bind . <Motion> {wm title . "Linear Interpolation Calculator"}
    #start of deck
        #start of deck
        #start of deck 
       

    #end of deck
    #end of deck
   #end of deck
   #end of  deck
   #end of deck
   #end of deck
    #end of deck
 
======
   
----








 


 
<<categories>> Toys | Example | Math|Function | Numerical Analysis|Engineering} regexp2} CALL {my render {Example Linear  Interpolation Calculator} { 
**Example Linear Interpolation Calculator**

----   
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] 17Jul2010
 Here is some starter code for Example Linear Interpolation Calculator
 written in eTCL. This eTCL script calls on
 console show, which can act funny on other TCL interpreters. 
----


   For the report button,
   the linear interpolation function takes 
   two known points on a line and
   solves for an intermediate point.
   The points are xx1,yy1   xx2,yy2 and xx3,?yy3?
   The input order of the five items
   is xx1 yy1 xx2 yy2 xx3 
   and solving for ?yy3?.
   The interpolation function loaded as
   proc pol. User should be able to write
   pol 50. 1000. 200. 1200.  150.
   and save answer (1133.3)  on console.






     ---- 




      

      
----
   ----
    ----
  
     
 ----
  





 



----

 
----
**Screenshots Section**




[http://farm5.static.flickr.com/4118/4803438156_b62e060e8b.jpg] 




----
**Comments Section**
         Please place any comments here, Thanks.

[gold] Changes.

 
======

----
**References***

  

http://wiki.tcl.tk/672


Windows wish console


http://wiki.tcl.tk/786


http://wiki.tcl.tk/788





http://wiki.tcl.tk/11339
Straightforward interpolation methods


http://www.eng.fsu.edu/~dommelen/courses/eml3100/aids/intpol/index.html
http://faculty.ksu.edu.sa/11843/interpolation/Linear-interpolation12-14-06.pdf

http://www.stat.uiowa.edu/ftp/atkinson/ENA_Materials/Overheads/sec_4-2.pdf



http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/interpolation/




  
**appendix TCL programs**



***FIRST VERSION*** 
       #start of deck
       #start of deck
      #start of deck
      #start of deck
       frame .frame -relief flat -bg aquamarine4
      pack .frame -side top -fill y -anchor center

    set names {{} x1: y1: {x3:} {y3:} {x2:} {answer:} possible:}
   foreach i {1 2 3 4 5 6 } {
    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 linear interpolation.
          from TCL WIKI,
          written on eTCL "
    
    tk_messageBox -title "About" -message $msg
 }
     proc pi {} {expr acos(-1)}
   
   proc interlinear { xx1 yy1 xx3 yy3 xx2   } {
     return [expr {  ((($xx2-$xx1)*($yy3-$yy1))/($xx3-$xx1))+ $yy1 } ] ;}

    proc pol { xx1 yy1 xx3 yy3 xx2   } {
     return [expr {  ((($xx2-$xx1)*($yy3-$yy1))/($xx3-$xx1))+ $yy1 } ] ;}


    proc calculate {     } {
    global colorwarning
    global colorback
    global answer2   answer3
    global side1 side2 side3 side4 side5 side6 
       set answer2 ""
   
   
   set answer2  [ interlinear  $side1 $side2 $side3 $side4 $side5  ] 

   set side6 $answer2  

   
      set pi5 [pi]
   if {$answer2 >= $pi5} { set error5   [expr {100.*$answer2/$pi5-100.}]   }
   if {$answer2 <= $pi5} { set error5   [expr {100.*$pi5/$answer2-100.}]   }
   #$x insert 1.0 " % error $error5 " 
   #$t insert 1.0 " % error  $error5 "


 }
      proc fillup {aa bb cc dd ee ff } {
    
    .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 "
   
}

 

      proc clearx {} {
    foreach i {1 2 3 4 5 6 } {
        .frame.entry$i delete 0 end
    }
    }

   proc reportx {} { 
   console show;
   puts "
   The interpolation function takes 
   two know points on a line and
   solves for an intermediate point.
   The points are xx1,yy1   xx2,yy2 and xx3,?yy3?
   The input order of the five items
   is xx1 yy1 xx2 yy2 xx3 
   and solving for ?yy3?.
   The interpolation function loaded as
   proc pol. User should be able to write
   pol 50. 1000. 200. 1200.  150.
   and save answer (1133.3)  on console."
   }


  frame .buttons -bg aquamarine4

    
    ::ttk::button .calculator -text "Solve" -command { calculate   }

    ::ttk::button .test2 -text "Testcase1" -command { clearx;fillup 10. 100. 60. 120.  50. 116 }
    ::ttk::button .test3 -text "Testcase2" -command { clearx;fillup  50. 1000. 200. 1200.  150. 1133 }
    ::ttk::button .test4 -text "Testcase3" -command { clearx;fillup 200. 1000. 300. 1500.  250. 1250}
    ::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
    bind . <Motion> {wm title . "Linear Interpolation Calculator"}

   #end of deck
    #end of deck
      #end of deck
      #end of deck      
      #end of deck
    #end of deck







======

****SECOND VERSION WITH ADDED HACKS *** 



     #start of deck
       #start of deck
      #start of deck
      #start of deck


    set colorgrd seashell4
 set colorback bisque
 set colorwarning tomato1
    frame .frame -relief flat -bg aquamarine4
     pack .frame -side top -fill y -anchor center

    set names {{} x1: y1: {x3:} {y3:} {x2:} {answer:} possible:}
   foreach i {1 2 3 4 5 6 } {
    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 linear interpolation.
          from TCL WIKI"
    
    tk_messageBox -title "About" -message $msg
    }
     proc pi {} {expr acos(-1)}
   
   proc interlinear { xx1 yy1 xx3 yy3 xx2   } {
     return [expr {  ((($xx2-$xx1)*($yy3-$yy1))/($xx3-$xx1))+ $yy1 } ] ;}

    proc calculate {     } {
    global colorwarning
    global colorback
    global answer2   answer3
    global side1 side2 side3 side4 side5 side6 
       set answer2 ""
   
   
   set answer2  [ interlinear  $side1 $side2 $side3 $side4 $side5  ] 

   set side6 $answer2  

   
      set pi5 [pi]
   if {$answer2 >= $pi5} { set error5   [expr {100.*$answer2/$pi5-100.}]   }
   if {$answer2 <= $pi5} { set error5   [expr {100.*$pi5/$answer2-100.}]   }
   #$x insert 1.0 " % error $error5 " 
   #$t insert 1.0 " % error  $error5 "


     }
    proc fillup {aa bb cc dd ee ff } {
 
    .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 "
   
      }

 

     proc clearx {} {
    foreach i {1 2 3 4 5 6 } {
        .frame.entry$i delete 0 end
    }
     }


  frame .buttons -bg aquamarine4

    
    ::ttk::button .calculator -text "Solve" -command { calculate   }

    ::ttk::button .test2 -text "Testcase1" -command { clearx;fillup 10. 100. 60. 120.  50. 116 }
    ::ttk::button .test3 -text "Testcase2" -command { clearx;fillup  50. 1000. 200. 1200.  150. 1133 }
    ::ttk::button .test4 -text "Testcase3" -command { clearx;fillup 200. 1000. 300. 1500.  250. 1250}
    ::ttk::button .clearallx -text clear -command {clearx  }
    ::ttk::button .about -text about -command about
    ::ttk::button .exit -text exit -command {exit}
    pack .calculator  -in .buttons -side top -padx 10 -pady 5
     
    pack  .clearallx .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
    bind . <Motion> {wm title . "Linear Interpolation Calculator"}
    #start of deck
        #start of deck
        #start of deck 
       

    #end of deck
    #end of deck
   #end of deck
   #end of  deck
   #end of deck
   #end of deck
    #end of deck
 
======
   
----








 


 
<<categories>> Toys | Example | Math|Function | Numerical Analysis|Engineering}} CALL {my revision {Example Linear  Interpolation Calculator}} CALL {::oo::Obj3996192 process revision/Example+Linear++Interpolation+Calculator} CALL {::oo::Obj3996190 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4