Discrete and Complex Algorithms for Curves