Will's Pascal Program

The picture below is a map of Pascal's Triangle with the spots colored according to their remainders mod 4. You can change the modulus or the size of the spots using the text fields below (just hit Enter to update the picture). Also, if you click on a spot it adds one to that spot and recalculates everything below. You can get some really neat patterns like this.

Disclaimer: I am not a programmer; I'm just screwing around with Java trying to learn something. I know there are bugs in here (for example, sometimes the spot you click on isn't the one that changes) and there is much more that can be done with this. I'll try to improve it gradually over time.

</COMMENT>

History: Many years ago my friend Dave and I taught a summer math camp in which we asked the students to make pictures like the one above. (It's a great way to keep a hyperactive child busy for hours!) A few years later Dave wrote a program like this one to draw the pictures. Then I remembered that the students often made mistakes in their pictures, getting one or more spots the wrong color, and their mistakes propagated through the pictures creating neat fractal-like patterns. So I wrote this program to let people deliberately make mistakes to come up with new designs.