I want to draw an iterative coloured square, so that a square gets divided into four subsquares and the top right subsquare is coloured and for the three remaining subsquares repeat this procedure. I'd like to use TikZ to accomplish this, but I don't want to draw everything "by hand".
I already found out about the
nested pics and about
l-systems but I'm not able to get them into proper code, especially because I don't understand the theory of
I am sure I could do it with some nested
nested pics, always scaled to fit, but if there is another simpler method I'd be happy - four or five iterations would be nice.
Here is an example of what the first iteration looks like: