User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
0–8 for 2D, 0–17 for 1D
Presets:
Elementsβ€”
Element Sizeβ€”
Coverageβ€”
Hausdorff Dim.β€”
Render Timeβ€”
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

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.

cantor dust fractal generator cantor set math visualization fractal geometry recursive fractal self-similar set

Formulas

The 1D Cantor Set construction removes the open middle third at each iteration. The number of segments and their lengths at step n:

N1D(n) = 2n , L(n) = 13n

Total remaining length converges to zero:

M1D(n) = 2n3n = (23)n

For 2D Cantor Dust, a unit square is divided into a 3Γ—3 grid and only the 4 corner sub-squares are retained:

N2D(n) = 4n , S(n) = 13n

The Hausdorff dimension dH is computed via the self-similarity relation:

dH = ln Nln s

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 n1D Segments1D Segment Length1D Total Length2D Squares2D Square Side2D Total Area
0111.000000111.000000
121/30.66666741/30.444444
241/90.444444161/90.197531
381/270.296296641/270.087791
4161/810.1975312561/810.039018
5321/2430.13168710241/2430.017341
6641/7290.08779140961/7290.007707
71281/21870.058528163841/21870.003425
82561/65610.039018655361/65610.001522
95121/196830.0260122621441/196830.000677
1010241/590490.01734110485761/590490.000301
n β†’ ∞∞00∞00

Frequently Asked Questions

At each iteration n, the total measure (length in 1D, area in 2D) equals (2⁄3)n for 1D or (4⁄9)n for 2D. Both ratios are less than 1, so as n β†’ ∞, the measure converges to 0. However, the set can be put in bijection with the real interval [0,1] via ternary expansion (using only digits 0 and 2), proving it is uncountable. Measure and cardinality are independent concepts in set theory.
The 2D mode is capped at 8 iterations, producing 48 = 65,536 rectangles. The 1D mode allows up to 17 iterations (217 = 131,072 segments). Beyond these limits, individual elements become sub-pixel and the computational cost grows exponentially with no visual benefit. The rendering time scales as O(Nn) where N is the branching factor.
The 2D Cantor Dust is the Cartesian product of two independent 1D Cantor Sets: C2D = C Γ— C. This product structure means the Hausdorff dimension doubles: 2 Γ— 0.6309 β‰ˆ 1.2619. The same logic extends to 3D (dH β‰ˆ 1.8928) using 8 corner sub-cubes from a 3Γ—3Γ—3 grid. Each dimension added multiplies the number of retained pieces by 2.
Yes. The standard Cantor Set removes 1 of 3 parts, but you can remove different fractions. Removing the middle fifth (keeping 2 pieces at scale 1/5) yields dH = ln(2)⁄ln(5) β‰ˆ 0.4307. For 2D, keeping different sub-squares (e.g., 5 of 9 instead of 4) produces the Vicsek fractal with dH β‰ˆ 1.4650. This generator uses the classical construction for mathematical accuracy.
At iteration n, each element has side length 1⁄3n relative to the canvas. On a 800px canvas, iteration 6 produces elements of ~1.1px, and iteration 7 yields ~0.37px elements that get anti-aliased into faint smudges. The fractal's self-similar structure means the overall pattern stabilizes visually around iteration 5 - 6 for typical screen resolutions.