Class CantorDust
java.lang.Object
org.episteme.core.mathematics.analysis.chaos.CantorDust
Cantor Dust - a 2D fractal generalization of the Cantor set.
The Cantor dust is constructed by recursively subdividing squares into 9 equal parts and removing the center square, similar to the Cantor set but in 2D. Also known as the Cantor square.
Construction
- Start with a unit square [0,1] × [0,1]
- Divide into 9 equal squares (3×3 grid)
- Remove the center square
- Repeat for each remaining square
Properties
- Hausdorff dimension: log(8)/log(3) ≈ 1.8928
- Zero Lebesgue measure (area = 0)
- Uncountable number of points
- Self-similar fractal
- Nowhere dense but perfect set
References
- Cantor, Georg (1883). "Über unendliche, lineare Punktmannigfaltigkeiten"
- Mandelbrot, B. (1982). "The Fractal Geometry of Nature"
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a square region in the Cantor dust. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncantorSet1D(int depth) Generates a 1D Cantor set for comparison.static booleancontains(double x, double y, int depth) Determines if a point (x, y) is in the Cantor dust.static List<CantorDust.Square> generate(int depth) Generates the Cantor dust up to a given depth.static doubleCalculates the Hausdorff dimension of the Cantor dust.static longsquareCount(int depth) Calculates the number of squares at a given depth.static doubletotalArea(int depth) Calculates the total area of the dust at a given depth.
-
Constructor Details
-
CantorDust
public CantorDust()
-
-
Method Details
-
generate
Generates the Cantor dust up to a given depth.- Parameters:
depth- recursion depth (0 = initial square)- Returns:
- list of squares in the dust
-
hausdorffDimension
public static double hausdorffDimension()Calculates the Hausdorff dimension of the Cantor dust.- Returns:
- log(8)/log(3) ≈ 1.8928
-
totalArea
public static double totalArea(int depth) Calculates the total area of the dust at a given depth. This approaches 0 as depth → ∞.- Parameters:
depth- recursion depth- Returns:
- total area = (8/9)^depth
-
squareCount
public static long squareCount(int depth) Calculates the number of squares at a given depth.- Parameters:
depth- recursion depth- Returns:
- number of squares = 8^depth
-
contains
public static boolean contains(double x, double y, int depth) Determines if a point (x, y) is in the Cantor dust. This is an approximation up to the given depth.- Parameters:
x- x-coordinatey- y-coordinatedepth- approximation depth- Returns:
- true if the point is likely in the dust
-
cantorSet1D
-