During the Han dynasty a characteristic ground plan was developed; it remained relatively constant through the centuries, applied to palaces and temple buildings in both China and Japan. Surrounded by an exterior wall, the building complex was arranged along a central axis and was approached by an entrance gate and then a spirit gate. Behind them in sequence came a public hall and finally the private quarters. Each residential unit was built around a central court with a garden. Based on imperial zoos and parks, the private residential garden soon became a distinctive feature of the walled complex and an art form in itself. The garden was laid out in a definite scheme, with a rest area and pavilions, ponds, and semiplanned vegetation.