working to include a more general solution for intersection of circles and ellipses.  Trying to adapt a matlab solution