Insects have evolved specialized structures by variation on a theme. Not only can gene manipulations and mutations produce a leg on the head of an insect in place of an antenna, but an antenna can grow in place of a leg.
Close examination of thousands of partial transformations of antennae to leg reveals a homology between the segments of the leg and segments of the antennae (see diagram). In the development of an appendage, one set of genes determines that an appendage will develop. In the developing appendage, each segment has its own factors that inform the cells of their location (femur, tibia, &c). Other genes, determine what type of appendage will develop. The antennapedia gene, controls the expression of dozens of other genes. These genes control the differentiation and growth of the cells in the segment. When antennapedia is properly expressed, the first segment forms scape instead of a coxa, the second segment forms a pedicel instead of a trochanter, &c. In the absence of antennapedia expression, the cells grow the leg structures instead.
Understanding how cell growth and development is regulated and how insects can regenerate tissue can provide useful insights into regeneration of human tissues for medical purposes.