From convex integration to flat tori