make "factor 1/sqrt 2 to a :depth :size if :depth = 0 [forward :size stop] left 45 a :depth-1 :size*:factor right 90 b :depth-1 :size*:factor left 45 end to b :depth :size if :depth = 0 [forward :size stop] a :depth-1 :size/2 jump :size/2 left 180 a :depth-1 :size/2 right 180 jump :size/2 end to jump :length penup forward :length pendown end to boundary :depth :size a :depth :size penup back :size pendown b :depth :size end to heighway :depth :size :parity if :depth = 0 [forward :size stop] left :parity*45 heighway :depth-1 :size*:factor 1 right :parity*90 heighway :depth-1 :size*:factor (-1) left :parity*45 end to heighway2 :depth :size if :depth = 0 [forward :size stop] left 45 heighway2 :depth-1 :size*:factor right 90 jump :size*:factor left 180 heighway2 :depth-1 :size*:factor right 180 jump :size*:factor left 45 end