Ground state of hard-core bosons in one-dimensional periodic potentials