Understanding complex dynamics by means of an associated Riemann surface