pwkit/ellipses.py: ellipse-related computations