Sunday, February 19, 2012

KTurtle - Koch Curve

Commands for Koch Curve -


reset
canvassize 850, 550
go 125, 350
tr 90
learn koch $x, $t {
if $t>0 {
$t=$t-1
$x=$x/3
koch $x, $t
tl 60
koch $x, $t
tr 120
koch $x, $t
tl 60
koch $x, $t
} else {
fw 3*$x }}
koch 200, 6

No comments:

Post a Comment

Click here to add comments. Please use appropriate words. Thanks.