Monday, February 20, 2012
Sunday, February 19, 2012
KTurtle - 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
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
Subscribe to:
Posts (Atom)