Monday, February 20, 2012

KTurtle - Flower Power


Commands for Flower Power -


reset
repeat 360 {
repeat 180 {fw 1 tr .5}
tr 90
repeat 180 {fw 1 tr .5}
tr 95}

Sunday, February 19, 2012

KTurtle - Outwards Curly

Commands for Outwards Curly -


reset
repeat 4 {
for $x = 1 to 100 {
fw 10
tr $x}
tr 80}

KTurtle - Chaotic Circles

Commands for Chaotic Circles -


reset
repeat 72 {
repeat 4 {
fw 100
tr 90}
fw 5
tr 5}
repeat 72 {
repeat 4 {
fw 100
tl 90}
fw 5
tl 5}
tl 90
repeat 72 {
repeat 4 {
fw 100
tr 90}
fw 5
tr 5}
repeat 72 {
repeat 4 {
fw 100
tl 90}
fw 5
tl 5}
tr 90

KTurtle - Circles and Lines

Commands for Circles and Lines -

reset
repeat 36 {
repeat 4 {
fw 100
tr 45
repeat 36 {
fw 2
tl 10}
tr 45}
fw 4
tr 10}

KTurtle - Heighway Dragon

Commands for Heighway Dragon -


reset
canvassize 500, 500
go 320, 400
tr 90
$size = 7
learn X $depth {
if $depth>0 {
X $depth-1
tl 90
Y $depth-1
fw $size}}
learn Y $depth {
if $depth>0 {
fw $size
X $depth-1
tr 90
Y $depth-1}}
pencolor 0,255,0
fw $size
X 10
tl 90
pencolor 255,0,0
Y 10
fw $size
go 50,450

KTurtle - Sierpinski Triangle

Commands for Sierpinski Triangle-

learn sierp $l {
if $l > 2 {
repeat 3 {
sierp $l/2
fw $l
tl 120
}}}
reset
canvassize 600, 533
go 50, 483
tr 90
sierp 500

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

KTurtle - Doughnut

Commands for Doughnut -


reset
repeat 36 
{tr 10 repeat 360 {fw 1 tr 1}}

KTurtle - Rotated Square

Commands for Rotated Square -

reset
repeat 24 {
tr 15
repeat 4 {
fw 120
tl 90}}

KTurtle - Polygons

Commands for Polygons -


reset
penup
tl 180
fw 150
tr 90
pendown
for $x = 2 to 50 {
repeat $x {
fw 20 tr 360/$x}

KTurtle - PolyClover

Commands for PolyClover -


reset
penup
tl 180
fw 150
tr 90
pendown
for $x = 2 to 50 {
repeat $x {
fw 10
tr 360/$x}
tr 90
center

Thursday, February 16, 2012

KTurtle - Circular Square

Commands for Circular Square


reset
repeat 4 {fw 40 tr 90
repeat 360 {fw 1 tr 1}}


KTurtle - Curly

Commands for Curly -


reset
penup
fw 50
pendown
repeat 4 {for $x = 1 to 100 {fw 10 tr 100 - $x}}
center

KTurtle - Circle Confusion

Commands for Circle Confusion -

reset
repeat 4 {fw 40 tr 90
repeat 360 {fw 1 tr 1}}
repeat 4 {fw 40 tl 90
repeat 360 {fw 1 tl 1}}
tr 180
repeat 4 {fw 40 tr 90
repeat 360 {fw 1 tr 1}}
repeat 4 {fw 40 tl 90
repeat 360 {fw 1 tl 1}}
tr 180

KTurtle - Spiral

Commands for Spiral -

reset
repeat 180 {fw .25 tr 1}
repeat 180 {fw .50 tr 1}
repeat 180 {fw .75 tr 1}
repeat 180 {fw 1 tr 1}
repeat 180 {fw 1.25 tr 1}
repeat 180 {fw 1.50 tr 1}
repeat 180 {fw 1.75 tr 1}
repeat 180 {fw 2 tr 1}
repeat 180 {fw 2.25 tr 1}
repeat 180 {fw 2.50 tr 1}
repeat 180 {fw 2.75 tr 1}
repeat 180 {fw 3 tr 1}
center

Monday, February 13, 2012

KTurtle - Hectasign

Command for Hectasign -

reset
repeat 2 {tr 90 repeat 2 {repeat 6 {fw 10 tr 60}
repeat 6 {fw 50 tr 60}
repeat 6 {fw 90 tr 60}
repeat 6 {fw 10 tl 60}
repeat 6 {fw 50 tl 60}
repeat 6 {fw 90 tl 60}
tr 120
repeat 6 {fw 10 tr 60}
repeat 6 {fw 50 tr 60}
repeat 6 {fw 90 tr 60}
tr 60
repeat 6 {fw 10 tr 60}
repeat 6 {fw 50 tr 60}
repeat 6 {fw 90 tr 60}
repeat 6 {fw 10 tl 60}
repeat 6 {fw 50 tl 60}
repeat 6 {fw 90 tl 60}}}
tr 180

KTurtle - Cone

Cone

Commands for Cone -

reset
penup
tl 90
fw 172.5
tr 90
pendown
repeat 360{fw 3 tr 1}
repeat 360{fw 2.75 tr 1}
repeat 360{fw 2.5 tr 1}
repeat 360{fw 2.25 tr 1}
repeat 360{fw 2 tr 1}
repeat 360{fw 1.75 tr 1}
repeat 360{fw 1.5 tr 1}
repeat 360{fw 1.25 tr 1}
repeat 360{fw 1 tr 1}
repeat 360{fw .75 tr 1}
repeat 360{fw .5 tr 1}
repeat 360{fw .25 tr 1}