Elliptic functions and iterative algorithms for π