aUCBLogo Demos and Tests / median_squares
to median_squares [:corner1 [-300 -300]] [:corner2 [300 -300]] [:count_ 20]
if :count_ == 0 [ stop ]
pu
setpos :corner1
pd
localmake "length distance :corner2
seth towards :corner2
repeat 4 [ fd :length lt 90 ]
fd :length / 2
localmake "newcorner2 pos
bk :length / 2
lt 90
fd :length / 2
(median_squares pos :newcorner2 :count_ - 1)
end