The terraces were used to grow crops. So, yeah, you're basically looking at an urban rooftop farm, 16th-century version.
Machu Picchu from the east, at the Sun Gate on the original Inca trail.
Pre-Inca ruins at Pachacamac, on the coast south of Lima. The complex is huge, and pre-dates the Inca period by more than 1,000 years.