As the 3D shape evolves, the strains induced by bending and twisting must remain below the maximum endurance limit for each layer in the construct, to avoid cracking or other forms of mechanical degradation of the materials. Optimization in this context, with a goal toward realizing the desired geometry (octagonal prism, octagonal prismoid, and hemisphere), involves analytic modeling and full 3D FEA techniques that capture all details of the mechanics. The analysis starts with a precursor device design on the 2D planar surface, which subsequently morphs into a 3D structure via the process of controlled compressive buckling. Precursor designs for the octagonal prism, octagonal prismoid, and hemisphere at the 2D planar surface appear on the left side of panels b, c, and d, respectively, in Fig. 1. Various regions of the precursors adhere strongly (red) or weakly (blue) to the substrate, and some locations are relatively thin (indicated by arrow) to enable localized folding deformations. The strong and weak adhesion occurs at the strongly and loosely attached regions, respectively, of the structure after the dissolution of the PR. The pre-strain values required to form closed 3D shapes depend on the various geometric parameters of the 2D precursors (Supplementary Fig. 1). The values necessary for the cases (Fig. 1) examined here are 111, 38, and 46% for the octagonal prism, octagonal prismoid, and hemisphere, respectively. The 3D shapes evolved under these pre-strain values are in the mid-left parts of Fig. 1b–d. In particular, the design in Fig. 1d enables the formation of an approximate hemisphere, as an example of a non-developable surface that cannot be realized by simple bending/twisting deformations of an unpatterned, 2D membrane. Here, the thin regions play crucial roles, as they allow highly flexible rotation of each constituent ribbon at the outer ends adjacent to the bonding sites. Figure 1e and Supplementary Fig. 2 show that the cross-section of each intermediate state of assembly approaches an arc of evolving central angle, in which this angle increases gradually with increasing degree of release of the pre-strain, reaching 180o at the final state. The heights of three mesostructures increase with the release of the pre-strain, as captured by simple analytic models (Fig. 1f, Supplementary Figs. 1 and 2). As shown in Fig. 1b–d and Supplementary Fig. 3, the strains reach peak values in the locations of the creases (indicated by arrow), where the thickness/length ratio is lower than that in the other regions. By comparison, the strains in the other parts are extremely low. The distributions of strain in the graphene and MoS2, separately shown in the mid-right parts of Fig. 1b–d, exhibit similar trends. The pre-strain values optimized by FEA experimentally yield 3D structures nearly identical to those predicted. The corresponding scanning electron microscopic (SEM) images are in Fig. 1b–d (right). The strain levels created in individual graphene, MoS2, and SU-8 layers of each 3D structure increase during the release of the pre-strain (Fig. 1g). The maximum strain in the graphene and SU-8 layers are 1.2% and ~2.3% for the octagonal prism, which are higher than those in the other structures, consistent with the comparatively high level of pre-strain required for this case. Note that the maximum strains in the graphene and MoS2 layers estimated by FEA are far below their corresponding elastic limits (~6 and 2%, respectively)33–37. The maximum strain in the MoS2 is ≤0.15%, indicating that MoS2 occupies a relatively flat region of the structure and that the strain is bending dominated. It is noteworthy that the maximum strain of MoS2 is much higher in the hemisphere than the other two configurations, due to the non-negligible bending deformations. The resistance of the graphene under repeated buckling and release appears in Fig. 1h. Throughout these cycles, the maximum change in resistance (~15%) occurs in the octagonal prism; changes for the octagonal prismoid and hemispherical 3D structures are relatively small. The reversible behavior observed in all three cases suggests purely elastic mechanical responses.