Developed by Wunderlich in 1954 and popularized by Barnsley in 1988, Iterated Function Systems provide a useful way to define self-similar fractals.
In the real line, the two functions that shrink by 1/3 toward 0 or 1 completely define the Cantor set. It's the only compact set closed under applying the two functions and taking the union. Also, starting with any compact set, repeatedly applying those two functions and unioning will give sets converging to the Cantor set.
In the plane, consider 4 functions shrinking by a factor of s toward each of the four corners of the unit square. For s=1/2, the "attractor" is the square region.
For smaller s, we get a Cantor set as drawn below.
animation