1 proc sinusoid
{a b
{c
1.0}} {
3 for {set t
0} {$t < [expr int
(50.0 * $c)]} {incr t
} {
4 set x
[expr int
($b * $t / 50.0)]
5 set y
[expr int
($a * sin
(2 * 3.1415926 * $t / 50.0))]
6 lappend mylist
[list $x $y]
8 set handle
[eval polygon make
[llength $mylist] $mylist]