"Persian" Recursion
Notice that since c1, c2, c3 and c4 are always between 0 and 15 and all the numbers used are integers, if b is greater than c1+c2+c3+c4, the quantity (c1+c2+c3+c4)/b will round off to zero, so the rug will just be a solid color. Experiments show that t he values of b that work the best are 2,3,4,5,6 and 7. Some combinations of a, b and c will also produce solid color rugs. (Maybe this could be given as a problem to students - what values of a, b and c will produce c in the formula?)
Surprisingly, the same values of a, b and c used with different color palettes look completely different as different assignments of colors emphasize different patterns.
To download a Windows Program that makes "Persian" rugs
click here.Scroll down until the large white square is on your screen - then enter the parameters and click on Draw rugs