The whole is equal to the sum of its parts: A probabilistic model of grouping by proximity and similarity in regular patterns.