Some metals — most famously Nitinol (nickel-titanium) — can be bent cold, then snap back to a "remembered" shape when warmed. The secret is two crystal structures the same atoms can adopt: soft, twinned martensite when cold, and stiff austenite when hot. Switching between them needs no melting and no atoms moving house — just the lattice shearing into a new pattern. Scroll through to watch the metal forget, then remember.
Cold, the wire is martensite: soft and easy to deform. Bending it doesn't snap atomic bonds — instead the lattice twins, mirror-domains flipping orientation to accommodate the strain. Now heat it past its transformation temperature: the crystal reverts to stiff austenite, whose only stable arrangement is the original shape — so the wire straightens itself. Cool it again and it stays straight (that bent shape is forgotten). Drag the temperature slider and use Bend to deform the cold wire.
Hold the alloy near room or body temperature (above its austenite finish, Af) and something remarkable happens: the stress itself triggers the transformation. As you load it, austenite converts to stress-induced martensite, letting it strain up to ~8% — many times the ~0.2% an ordinary metal can take before it yields permanently. Release the load and that martensite is unstable, so it reverts to austenite and the part springs all the way back. No heating needed. Press Flex to bend the eyeglass frame / stent.
Both tricks come from one fact: the alloy has two crystal phases it can switch between reversibly, with no atoms diffusing (a "diffusionless" transformation) — so the change is fast and repeatable.