Generating structures by editing prototypes