I present the Metropolis algorithms to sample random numbers from an arbitrary image