#!/usr/bin/logo make "MaxIter 200 make "width 400 make "height 300 make "Xmin -4 make "Xmax 4 make "Ymin -3 make "Ymax 3 to next_line penup left 90 fd 1 left 90 fd :width right 180 end penup left 90 fd (quotient :width 2) left 90 fd (quotient :height 2) left 90 make "X :Xmin make "Y :Ymin repeat :height [ show :Y repeat :width [ show :X make "temptest 0 make "r1 :X make "r2 :Y make "i 0 while :temptest=0 [ make "i sum i 1 if :r1<1 and :r2<1 and r1>-1 and r2> -1 [ make "temptest 1 penup ] if :r1>10 and :r2>10 [ make "temptest 1 pendown ] if :r1>10 and (quotient :r2 :r1 > 3) [ make "temptest 1 pendown ] make "tmp :r1 make "r1 quotient sum :r1 :r2 2 make "r2 product :tmp :r2 if :i=:MaxIter [ make "temptest 1 ] ] fd 1 make "X sum :X quotient - :Xmax :Xmin :width ] next_line make "Y sum :Y quotient - :Ymin :Ymax :height ]