random_cantor_dust#
- random_cantor_dust(shape, n, p=2, f=0.8)[source]#
Generates an image of random cantor dust
- Parameters:
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.
- Returns:
dust – A boolean image of a random Cantor dust
- Return type:
ndarray
Examples
Click here to view online example.