OUTPUT BUFFER:
#!/usr/local/bin/wish set a 166.99 set b 131.27 set c 189.41 set al 90. set bt 113.81 set ga 90. proc PAD {} { package require Img toplevel .clau set w ".clau" frame $w.f pack $w.f canvas $w.c -width 1000 -height 1000 pack $w.c return } proc Tracage {} { global a global c global bt set a [expr $a/2.] set c [expr $c/2.] set bt [expr $bt*3.1415926/180.] set can ".clau.c" set xs 200 set ys 10 set d 2 set cmp 0 for {set n 0} {$n < 10} {incr n} { set x [expr $xs + $n*$a] set y $ys $can create oval [expr $x-$d] [expr $y-$d] [expr $x+$d] [expr $y+$d] \ -width 1 -outline black -fill black set Pt($cmp) [list $x $y] if {$cmp} { foreach {x1 y1} [set Pt([expr $cmp-11])] {} $can create line $x $y $x1 $y1 } incr cmp for {set j 1} {$j <= 10} {incr j} { set p [expr $cmp - 1] foreach {x0 y0} [set Pt($p)] {} set x [expr $x0 + $c*cos($bt)] set y [expr $y0 + $c*sin($bt)] set xc [expr $x0 + $a/2. + $c/2.*cos($bt)] set yc [expr $y0 + $c/2.*sin($bt)] $can create oval [expr $xc-$d] [expr $yc-$d] [expr $xc+$d] [expr $yc+$d]\ -width 1 -outline black -fill black $can create oval [expr $x-$d] [expr $y-$d] [expr $x+$d] [expr $y+$d]\ -width 1 -outline black -fill black $can create line $x $y $x0 $y0 set Pt($cmp) [list $x $y] if {$cmp > 11} { foreach {x1 y1} [set Pt([expr $cmp-11])] {} $can create line $x $y $x1 $y1 } incr cmp } } return } PAD Tracage