Cantor

Cantor is a 2-dimensional Cantor set, a square divided into nine parts with the middle rectangle removed, and the same process applied to the other eight rectangles, ad infinitum. The black region is the Cantor set; the gaps are decorated. A version where all the rectangles are identical squares can be described mathematically as the set of (x, y) such that x and y lie between 0 and 1 and contain no 1s in their base 3 representation; e.g. (0.022023, 0.200223) would be in the set.

If you click or drag on the image, the point you select is used as one corner of the middle rectangle, and all further subdivisions remove the same vertical and horizontal fractions of the remaining regions.




Valid HTML Valid CSS
Applets Gallery / Cantor / created Sunday, 5 July 1998
If you link to this page, please use this URL: http://www.gregegan.net/APPLETS/03/03.html
Copyright © Greg Egan, 1998. All rights reserved.