The Inventors have developed shape memory composites that fold themselves along embedded hinges. The hinges are controlled by embedded heating elements, and their placement in the composite and the order in which they are triggered create a fold pattern that determines the final shape of the 3D mechanism. The self-folding composite combines a contractile layer or prestretched polystyrene (PSPS) and a passive paper substrate resulting in a bimorph actuator. PSPS is a shape memory polymer (SMP) which is mechanically programmed to contract bidirectionally when heated to approximately 100C. Embedded resistive circuits are included at each hinge as heating elements to enable localized heating and activation of the PSPS. The composite includes PSPS on both sides to enable bidirectional folding. When a contractile layer is activated, it exerts a shear stress on the substrate, causing the composite to fold. Once folding is completed, the hinge is cooled and the PSPS hardens, resulting in a static fold. Self-folding hinges are programmed into the composite with layer-specific features. Passive flexures for dynamic mechanisms are programmed in a similar manner. Not only are flexure joints compatible with folded assembly, they also have operational advantages over typical bearing joints, such as negligible fiction losses and monolithic construction.