Sierpinski gasket
Pseudo-code
- Determine the smallest unit of a square will be. If it reaches that size, then fill it with a solid color.
- Otherwise, divide the square into four squares. Recursively draw a Sierpinski gasket on the top-left square, top-right square and bottom-right square.
Implementation
See the Pen by cuadraman (@cuadraman) on CodePen.