De sneeuwvlok-krommen van Koch (figuur van niveau 1) to flock :size fd :size lt 60 fd :size rt 120 fd :size lt 60 fd :size end to snow :size cs ht repeat 3[flock :size/3 rt 120] end De sneeuwvlok-krommen van Koch (volledig programma met recursie) to flock :size :niveau ifelse :niveau = 0 [fd :size][flock :size/3 :niveau-1] lt 60 ifelse :niveau = 0 [fd :size][flock :size/3 :niveau-1] rt 120 ifelse :niveau = 0 [fd :size][flock :size/3 :niveau-1] lt 60 ifelse :niveau = 0 [fd :size][flock :size/3 :niveau-1] end to snow :size :niveau cs ht ifelse :niveau > 0 [repeat 3[flock :size/3 :niveau-1 rt 120]][repeat 3[fd :size rt 120]] end