transformation optics code for multimode bends