diff options
author | lecoanet | 2000-05-11 13:37:04 +0000 |
---|---|---|
committer | lecoanet | 2000-05-11 13:37:04 +0000 |
commit | 65b6856dc74bf2ea55f86784e4b76734a88c8771 (patch) | |
tree | 90f75c131b6ca3819439b87070079a48543965bf /sandbox/smooth.tcl | |
parent | 3e92dee11f03f4b03511c85f46dece0b8760d253 (diff) | |
download | tkzinc-65b6856dc74bf2ea55f86784e4b76734a88c8771.zip tkzinc-65b6856dc74bf2ea55f86784e4b76734a88c8771.tar.gz tkzinc-65b6856dc74bf2ea55f86784e4b76734a88c8771.tar.bz2 tkzinc-65b6856dc74bf2ea55f86784e4b76734a88c8771.tar.xz |
*** empty log message ***
Diffstat (limited to 'sandbox/smooth.tcl')
-rw-r--r-- | sandbox/smooth.tcl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sandbox/smooth.tcl b/sandbox/smooth.tcl new file mode 100644 index 0000000..ad34d37 --- /dev/null +++ b/sandbox/smooth.tcl @@ -0,0 +1,34 @@ +#!/usr/bin/wish -f + +load tkzinc3.1.so +package require Img + +set top 1 +set points "50 -150 100 -50 270 -130 220 -200 200 -180 180 -300 140 -320 70 -300" +set lw 3 + +set r [zinc .r -backcolor gray -relief sunken] +pack .r -expand t -fill both +.r configure -width 800 -height 500 +.r scale $top 1 -1 +#.r configure -drawbboxes t +set view [.r add group $top -tags controls] + + +set smooth [.r smooth $points] +set fit [.r fit $points 0.1] + + +set mp [.r add bezier $view $smooth \ + -linecolor yellow -fillcolor tan -fillpattern AlphaStipple8 \ + -tags "bezier" -linewidth $lw] +set mp2 [.r add bezier $view $fit \ + -linecolor yellow -fillcolor tan -fillpattern AlphaStipple8 \ + -tags "bezier" -linewidth $lw] +set poly [.r add curve $view $points -marker AtcSymbol9] +set poly2 [.r add curve $view $points -marker AtcSymbol9] + +.r translate $mp2 300 0 +.r translate $poly2 300 0 + +source "controls.tcl" |