(load "stk-turtle-stuff") (define (movement-for-star action n) (if (= n 1) (begin (action) (right 120)) (begin (action) (right 120) (movement-for-star action (- n 1))))) (define (movement-for-koch action) (action) (left 60) (action) (right 120) (action) (left 60) (action)) (define (draw-koch level length) (if (= level 1) (movement-for-koch (lambda () (forward length))) (movement-for-koch (lambda () (draw-koch (- level 1) length))))) (define (draw-star level size) (movement-for-star (lambda () (draw-koch level size)) 3)) (right 90) (movement-for-star (lambda () (begin_fill) (color "#800080") (draw-star 5 1) (end_fill) (begin_fill) (color "#ff0000") (draw-star 4 1) (end_fill) (begin_fill) (color "#ffff00") (draw-star 3 1) (end_fill) (begin_fill) (color "#008000") (draw-star 2 1) (end_fill) (begin_fill) (color "#0000ff") (draw-star 1 1) (end_fill)) 3)