Realization of macroscopic ratchet effect based on nonperiodic and uneven potentials