Now begin to decrement gap by one, tracing a line on which you mark every twenty-second point, and then every twenty-first, and so on, until gap = 1, when you begin to increment it by one again. As an algorithm:
gap := 1;
gap_inc := +1;
gap_min := 2;
gap_max := 23;
count := 1;
repeat
gap := gap + gap_inc;
if (gap = gap_min) or (gap = gap_max) then gap_inc := -gap_inc;
Change (x,y);
DrawLine (x,y,xcenter,ycenter,gap);
until ShapeComplete (x,y);
gap itself will repeatedly travel in decrements of one from 1 to 23 and then in decrements of one from 23 to 1 as gap_inc varies between +1 and -1. To see the result when (x,y) travels in a circle around (xcenter,ycenter), examine this series of images: (x,y) is white, and the marked points on the line between (x,y) and (xcenter,ycenter) are yellow.
Add color, vary gap_min and gap_max, and allow (x,y) to move in other patterns around (xcenter,ycenter), and you will produce the mathemorchids.
Pascal program for mathemorchids.