simple random generation of smooth connected irregular shapes for cognitive studies
A simple method for generating random smooth connected mildly irregular binary shapes is introduced. It consists of 1) taking the Minkowski sum of a closed linear spline with random vertices and of a disk (in other words, joining consecutive randomly generated points with straight lines drawn with a "large ballpoint pen"); 2) applying Gaussian blur with a large blur radius; and 3) thresholding permissively. With very permissive thresholds and moderately large numbers of seed points, this produces fairly natural-looking "random blobs." One can also generate "cartoonish shadows" and "boldface alphabets" with less permissive thresholds and smaller numbers of seed points. Rotation invariant families of shapes can be generated by drawing the spline vertices from rotation invariant distributions. Results obtained with the uniform distribution on the disk and the binormal distribution are presented. They are contrasted to those obtained with the uniform distribution on the square. Drawing random points from a binormal distribution gives a collection of shapes that look natural over a wide range of numbers of seed points. The shapes derived with the uniform distributions, however, are more "interesting." Thresholds close to the most restrictive value yielding an empty shape when there is only one seed point work well. This critical threshold is easy to compute using the drawing software; thresholding more permissively guarantees a nonempty shape. The most restrictive threshold guaranteeing a connected final shape is analytically estimated using the diameter of the "pen nib" and the Gaussian blur sigma. The various bounds are in agreement.
minkowski sum gaussian blur thresholding rotation invariant families of shapes smooth irregular shapes dilation level sets effective radius random binary shape generation