random_cantor_dust(shape, n, p=2, f=0.8)[source]

Generates an image of random cantor dust

  • shape (array_like) – The shape of the final image. If not evenly divisible by $p**n$ it will be increased to the nearest size that is.

  • n (int) – The number of times to iteratively divide the image.

  • p (int (default = 2)) – The number of divisions to make on each iteration.

  • f (float (default = 0.8)) – The fraction of the set to keep on each iteration.


dust – A boolean image of a random Cantor dust

Return type: