let (cos, sin, pi) = System.Math.Cos, System.Math.Sin, System.Math.PI
let (width, height) = 1000., 1000. // image dimension
let scale = 6./10. // branch scale relative to trunk
let length = 400. // trunk size
let rec tree x y length angle =
if length >= 1. then
let (x2, y2) = x + length * (cos angle), y + length * (sin angle)
printfn ""
x y x2 y2
tree x2 y2 (length*scale) (angle + pi/5.)
tree x2 y2 (length*scale) (angle - pi/5.)
printfn "
"