"TURTLES" : a simple pattern-generating program

        1 START (0)
        2 GO 10
        3 TURN 90
        4 IF (0) THEN GO TO 6
        5            ELSE GO TO 2
        6 STOP 

Four results:
    (a) as written, program generates a convex polygon (square): S / V = 4
    (b) if [2 GO 20] :        a larger square
    (c) if [3 TURN 120] : a triangle
    (d) if [3 TURN 144] : a five-pointed star

Is a five-pointed star qualitatively different from a square?


Text material © 2005 by Steven M. Carr