Multifunctional Three-Dimensional Curvilinear Self-Folding of Glassy Polymers