Theta functions, elliptic functions and π