Scientists have pre-programmed materials to change their shape over time.