Arjen Markus ( 23 april 2003) I needed a break and decided to browse around at Mathworld [L1 ]. I stumbled on the page describing Strang's strange figures and found a few nice figures. After reading the text I thought that it would be very easy to do this in Tcl. And indeed, it is very easy. See for yourself.
(So easy in fact, that I did bother breaking the script down into procs ...)
Note, the patterns are akin to Moire patterns
# Strang's strange patterns ... canvas .c -width 600 -height 450 -background white pack .c -fill both for { set i 0 } { $i < 3600 } { incr i } { set sini [expr {225+200.0*sin($i)}] set tani [expr {225+100.0*tan($i)}] set i2 [expr {$i/6}] .c create rectangle $i2 $sini [expr {$i2+1}] [expr {$sini+1}] -outline red .c create rectangle $i2 $tani [expr {$i2+1}] [expr {$tani+1}] -outline blue }