Haferman Carpet
2016-02-27, post № 106
mathematics, programming, Pygame, Python, #animated gif, #automation, #black, #black and white, #carpet, #cell, #cell simulation, #cellular, #cellular automation, #cellular simulation, #fractal, #generating, #generation, #gif, #iterations, #weave, #white, #woven
The Haferman Carpet is a fractal, which kind of looks like a woven carpet. To generate it, you start with a single black pixel and apply in each cycle a set of rules.
In each generation every pixel in the carpet will be replaced by nine pixels according to the rules. A black pixel is represented by a 𝟢, a white one by a 𝟣.
The Rules
Source code: haferman-carpet.py
Extra assets: haferman-carpet_6-iterations_0.png, haferman-carpet_6-iterations_1.png, haferman-carpet_6-iterations_2.png, haferman-carpet_6-iterations_3.png, haferman-carpet_6-iterations_4.png, haferman-carpet_6-iterations_5.png, haferman-carpet_6-iterations_6.png, haferman-carpet_7-iterations.gif, haferman-carpet_7-iterations_0.png, haferman-carpet_7-iterations_1.png, haferman-carpet_7-iterations_2.png, haferman-carpet_7-iterations_3.png, haferman-carpet_7-iterations_4.png, haferman-carpet_7-iterations_5.png, haferman-carpet_7-iterations_6.png, haferman-carpet_7-iterations_7.png