Shape Optimization for Composite Materials and Scaffold Structures