Thanks Jeff and Daniel, This is code that works, to el :x :n pd ifelse :n = 0 [ fd :x ] [repeat 4 [ cl :x / 3 (:n - 1) rt 90]] end the inputs are 150 and 2 Jim