%%% Pythagorean tree \def\dir{2011/kees-van-der-laan/} \immediate\pdfximage width.8\hsize{\dir/pyta.pdf} \centerline{\pdfrefximage\pdflastximage} \beginverbatim /sq{ 0 0 moveto s 0 rlineto 0 s rlineto s neg 0 rlineto closepath stroke } def /pythagoreantree { sq % draw the square 1 sub dup 0 ge { gsave 0 s translate 45 rotate .7071 dup scale % transform user space pythagoreantree % do it again, Sam grestore .5 s mul 1.5 s mul translate -45 rotate .7071 dup scale % transform user space pythagoreantree % do it again, Sam } if 1 add } def /s 50 def 11 pythagoreantree pop showpage \endverbatim Bosboom drew the tree in the 1940-ies by hand, Lauwerier (1986): {\it Fractals, meetkundige figuren in eindeloze herhaling\/}, Aramith, programmed them nonrecursively in Basic, and me, captivated by the path datastructure and its operators, in \METAFONT\ in the mid-90-ies. Undoubtedly many others have drawn the tree since the PC entered our homes. It was an illustration in the 1972 CWI calendar, from which I borrowed the $\pi$-decimals 2010 pearl. However, PostScript, which is with us for 30 years already, mind you, allows to transform, rotate and scale user space. A very powerful facility, and together with recursion extremely useful for drawing these kind of fractals, where it is all about one element, redrawn translated, scaled or rotated. The {\it Thinking in PostScript\/} (1990) book (for free on the WWW) states that it is silly to program fractals in PS. No longer true since we can transform PS into PDF, canned for inclusion in \TeX\ documents. More about Pythagoras Trees soon in MAPS!