Sierpinski carpet

Hi eveveryone! I am an architecture student and a beginner on Grasshopper. I am trying to create a sierpinski carpet on grasshopper for a project but with no success. I found that there is the Weaverbird spierpinski carpet component but i can not understand how it works. 
Can someone please help me to understand the process of how we can create the carpet with or without the component? 

  • up

    peter fotiadis

    This is a classic simple fractal case.

    Imagine a function dividing a rectangle into 9 pieces and skip the one at the center. Then you feed the remaining 8 into the same function that does the division ... and the "loop" process repeats until a stop condition (say: N of "loops") is satisfied. This is called recursion (a function calls itself, that is).

    The "trad" way to do fractals is via code (GH is a-cyclic). Notify if you think that an example of that kind could be useful to you.

    9