On a 3D crack tracking algorithm and its variational nature