#!/usr/bin/tclsh
#
# Winkeltabelle im CSV Format
#
# Heinz Bruederlin
# 25.02.2013
#

set pi 3.14159265
for {set l 30} {$l <= 3600} {} {
    if {$l == 30} {
	puts -nonewline "    ; "
    } else {
	puts -nonewline [format "%4d; " $l]
    }
    for {set w 0.5} {$w < 6.5} {set w [expr {$w + 0.5}]} {
	set h [expr {$l * sin($w/360 * 2 * $pi)}]
	if {$l == 30} {
	    puts -nonewline [format "%8.3f; " $w]
	} else {
	    puts -nonewline [format "%8.3f; " $h]
	}
    }
    puts ""
    if {$l < 100} {
	incr l 10
    } elseif {$l < 300} {
	incr l 20
    } elseif {$l < 500} {
	incr l 50
    } elseif {$l < 1000} {
	incr l 100
    } else {
	incr l 200
    }
}
