This is a strange, 1-dimensional cellular automaton, which can calculate square numbers, and looks all beautiful. It could also, by a stretch of the word, be called a fractal. Explanation: This is based on a puzzle a Maths teacher told me long ago. You start off with a row of, say, 10 closed doors (black squares), and a column of 10 people, each of whom is obsessed with a number. (Person 1 likes the number 1, Person 2 likes the number 2, and so on.) First, Person 1 goes across, opening all of the doors which are multiples of 1 (all of them). Then, Person 2 inverts all of the multiples of 2, then Person 3 does multiples of 3, all of the way up to Person 10. The puzzle is that every number gets inverted a specific number of times, before the number of the Person is greater than the number of the door. Some doors will be open at the end, and some closed. Can you tell which ones are open or closed at the end, just by their number? It seems like an impossible task at first, but not if you look at what the question's asking. What are the numbers a door is a multiple of? It's factors! People 1 and the door's number cancel each other out. The only factors that don't have pairs cancelling them out... Are square-roots! This means that only square numbers are open after all people have combed through, opening and closing them. You might think, 'Well, what about higher powers?', but as long as it's a square, it will work. Configuration options: -Crazy, inverted mode: People now change the doors which aren't multiples of their number, and leave those that are. -Cocktail-shaker mode: Odd-numbered people go from left to right, even-numbered ones from right to left.
This was all made using the same four-sided polygon filler I used in another game, Ninja Pong, made using two of @DadOfMrLog's Triangle Filler's triangles strapped together. The triangle-filler is possibly the best one available. I can't tell you how good it is. My previous programming was constrained by the fact that I could only do lines, then also rectangles, now I can do ANYTHING! *Laughs maniacally.* Also, look at 's other things and at the aforementioned Ninja Pong (in which I was mostly constraining myself to squares and rectangles, I just wanted one that I had complete control over), available at: