(* Flocon de Von Koch en utilisant la tortue Logo
   (voir aussi l'exercice 2.5) *)

open Turtle (* programme 13 page 90 *)

let rec von_koch n d =
  if n = 0 then
    advance d
  else begin
    let d = d /. 3. in
    von_koch (n - 1) d;
    rotate_left 60.;
    von_koch (n - 1) d;
    rotate_right 120.;
    von_koch (n - 1) d;
    rotate_left 60.;
    von_koch (n - 1) d;
  end

This document was generated using caml2html