Text this: Mathematical modeling of flexible printed circuit configuration: a study in deformation and optimization