Geometry-driven evolution and functional optimization for curves