Class CantorDust

java.lang.Object
org.episteme.core.mathematics.analysis.chaos.CantorDust

public class CantorDust extends Object
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

  1. Start with a unit square [0,1] × [0,1]
  2. Divide into 9 equal squares (3×3 grid)
  3. Remove the center square
  4. 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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Represents a square region in the Cantor dust.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<Real[]>
    cantorSet1D(int depth)
    Generates a 1D Cantor set for comparison.
    static boolean
    contains(double x, double y, int depth)
    Determines if a point (x, y) is in the Cantor dust.
    generate(int depth)
    Generates the Cantor dust up to a given depth.
    static double
    Calculates the Hausdorff dimension of the Cantor dust.
    static long
    squareCount(int depth)
    Calculates the number of squares at a given depth.
    static double
    totalArea(int depth)
    Calculates the total area of the dust at a given depth.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CantorDust

      public CantorDust()
  • Method Details

    • generate

      public static List<CantorDust.Square> generate(int depth)
      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-coordinate
      y - y-coordinate
      depth - approximation depth
      Returns:
      true if the point is likely in the dust
    • cantorSet1D

      public static List<Real[]> cantorSet1D(int depth)
      Generates a 1D Cantor set for comparison.
      Parameters:
      depth - recursion depth
      Returns:
      list of intervals [start, end]