Logo Koch

Aus ProgrammingWiki

Wiki-Quelltext dieser Seite.

<language>Logo</language>
<canvas width=400 height=400></canvas>

<run id="595c954dc4bd6">
to line :count :length
 ifelse :count = 1 [fw :length] 
 [
   make "count :count -1 
   line :count :length
   lt 60 line :count :length
   rt 120 line :count :length
   lt 60 line :count :length
  ]
end

to koch :count :length
  rt 30 line :count :length
  rt 120 line :count :length
  rt 120 line :count :length
end
cs
speed 9
setxy 30 300
koch 5 4
</run>