This wire is amazing... Its called NiTinol wire. It remembers its original shape and goes back to it when heated up. Before explaining it all, lets do the experiment first.
Here's a piece of NiTinol wire. Almost straight in shape right...
Bend it into any shape you want. Here's the same NiTinol wire bent into a waveform.
Take the piece of wire to a heat source. Make sure you are holding the wire with some device that will protect your fingers/hand from heat.
You can even use a hairdryer to do this.
Keep watching the wire as it changes the shape quite quickly.
Keep the heat source on till you see the wire almost straight again (the shape we started off with!!!)
And here's the wire at the end of the experiment..isn't it cool...
Yes, ofcourse you can bend the wire and keep it in that shape with a little patience and teaching the wire to remember the new shape too but that's another experiment for another day.
What's happening?
NiTinol is an alloy of Nickel and Titanium. Unlike other alloys, this one has two different crystalline structures. One of them called Martensite phase is the structure that the alloy prefers while at low temperature and at high temperature, it prefers the phase called Austenite. During Martensite phase, the crystal structure is such a way that it can be deformed in any direction. But when its heated to Austenite phase, the structure reverts back to the original form.