Computational study of the percolation phenomena in inhomogeneous two- and three-dimensional systems