Classic cantor set is top row. Wrote something that could take any odd number and make the a similar set.

Instructions

Static sketch.