Cantor Dust Generator
Generate and visualize Cantor Dust fractals in 1D and 2D with adjustable iteration depth, colors, and export options. Interactive fractal geometry tool.
About
Cantor Dust is a multi-dimensional generalization of the Cantor Set, constructed by recursively removing the middle portion of line segments (1D) or interior sub-squares (2D). At iteration n, the 1D set contains 2n segments each of length (1β3)n, yielding a Hausdorff dimension of ln 2ln 3 ≈ 0.6309. The 2D variant retains 4 corner squares from a 3Γ3 grid at each step, producing a dust with Hausdorff dimension ln 4ln 3 ≈ 1.2619. The resulting set has Lebesgue measure zero and is totally disconnected - no two points share a connected path. Miscounting iterations or misunderstanding the removal pattern leads to incorrect fractal dimension estimates and flawed geometric analysis. This tool computes the exact recursive geometry and renders it at pixel precision.
Formulas
The 1D Cantor Set construction removes the open middle third at each iteration. The number of segments and their lengths at step n:
Total remaining length converges to zero:
For 2D Cantor Dust, a unit square is divided into a 3Γ3 grid and only the 4 corner sub-squares are retained:
The Hausdorff dimension dH is computed via the self-similarity relation:
Where N = number of self-similar copies (2 for 1D, 4 for 2D) and s = scaling factor (3). This yields dH ≈ 0.6309 (1D) and dH ≈ 1.2619 (2D).
Reference Data
| Iteration n | 1D Segments | 1D Segment Length | 1D Total Length | 2D Squares | 2D Square Side | 2D Total Area |
|---|---|---|---|---|---|---|
| 0 | 1 | 1 | 1.000000 | 1 | 1 | 1.000000 |
| 1 | 2 | 1/3 | 0.666667 | 4 | 1/3 | 0.444444 |
| 2 | 4 | 1/9 | 0.444444 | 16 | 1/9 | 0.197531 |
| 3 | 8 | 1/27 | 0.296296 | 64 | 1/27 | 0.087791 |
| 4 | 16 | 1/81 | 0.197531 | 256 | 1/81 | 0.039018 |
| 5 | 32 | 1/243 | 0.131687 | 1024 | 1/243 | 0.017341 |
| 6 | 64 | 1/729 | 0.087791 | 4096 | 1/729 | 0.007707 |
| 7 | 128 | 1/2187 | 0.058528 | 16384 | 1/2187 | 0.003425 |
| 8 | 256 | 1/6561 | 0.039018 | 65536 | 1/6561 | 0.001522 |
| 9 | 512 | 1/19683 | 0.026012 | 262144 | 1/19683 | 0.000677 |
| 10 | 1024 | 1/59049 | 0.017341 | 1048576 | 1/59049 | 0.000301 |
| n β β | β | 0 | 0 | β | 0 | 0 |