Creating the Mathemorchids

To understand how the mathemorchids are formed, imagine a point moving in two dimensions around a fixed point. Identify the moving point by the variable coordinates x and y and the fixed point by the coordinates xcenter and ycenter. At the first point (x,y) find the line that connects it with (xcenter,ycenter), marking every second point of the line. In other words, the variable gap = 2. At the second (x,y), find the line again, this time marking every third point of the line: gap = 3. And so on, incrementing gap by one each time, until you have traced the line on which you have marked, say, every twenty-third point: gap = 23.

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.

Mathemorchids

Maths Index

Main Index