Generation of random fields characterized by discrete regions of constant value