block by saifuddin778 fde27a651ff36de88aa6eb2ab2f8fa73

Sierpiński Carpet

Full Screen

Implementation of a Sierpiński carpet. The formal procedure of construction begins with a square, which is cut into 9 congruent subsquares in a 3-by-3 grid, and the central subsquare is removed.

However, in this implementation, the problem is approached a bit differently: Each square is divided into 9 equally sized small squares (i.e. 3x3 grid), where the centroid of this grid is colored. Then each of these small squares are repetitively divided until a finite limit. At each round of iteration, 9 new squares are added in the list to be processed accordingly.

index.html