two examples of recursive programs the attractive graphic pattern shown in fig consists of superposition of five curves these curves follow regular pattern and suggest that they might be drawn by display or plotter under control of computer our goal is to discover the recursion schemaaccording to which the drawing program might be constructed inspection reveals that three of the superimposed curves have the shapes shown in fig we denote them by and the figures show that hi+ is obtained by the composition of four instances of hi of half size and appropriate rotationand by tying together the four hi by three connecting lines notice that may be considered as consisting of four instances of an empty connected by three straight lines hi is called the hilbert curve of order after its inventorthe mathematician hilbert ( fig hilbert curves of order and since each curve hi consists of four half-sized copies of hi- we express the procedure for drawing hi as composition of four calls for drawing hi- in half size and appropriate rotation for the purpose of illustration we denote the four parts by abc and dand the routines drawing the interconnecting lines by arrows pointing in the corresponding direction then the following recursion scheme emerges (see fig ad bc cb da let us assume that for drawing line segments we have at our disposal procedure line which moves drawing pen in given direction by given distance for our conveniencewe assume that the direction be indicated by an integer parameter as degrees if the length of the unit line is denoted by uthe procedure corresponding to the scheme is readily expressed by using recursive activations of analogously designed procedures and and of itself procedure (iinteger)begin if then ( - )line( ) ( - )line( ) ( - )line( ) ( - end end this procedure is initiated by the main program once for every hilbert curve to be superimposed the