posted 11 years ago
I am trying to create the Sierpinski Carpet using recursion. I divided the square into nine equal squares in the three rows and three columns.
And the center sub-square is removed.
I do not know how to repeat that process for the eight remaining sub-squares which surround the center square that was “removed.”
This is my code:
Please help me.