Geometric patterns and microstructures in the study of material defects and composites