(self, o)
return o.intersection(self)
The intersection of this ellipse and another geometrical entity
        `o`.

        Parameters
        ==========

        o : GeometryEntity

        Returns
        =======

        intersection : list of GeometryEntity objects

        Notes
        -----
        Currently supports intersections with Point, Line, Segment, Ray,
        Circle and Ellipse types.

        See Also
        ========

        sympy.geometry.entity.GeometryEntity

        Examples
        ========

        >>> from sympy import Ellipse, Point, Line, sqrt
        >>> e = Ellipse(Point(0, 0), 5, 7)
        >>> e.intersection(Point(0, 0))
        []
        >>> e.intersection(Point(5, 0))
        [Point(5, 0)]
        >>> e.intersection(Line(Point(0,0), Point(0, 1)))
        [Point(0, -7), Point(0, 7)]
        >>> e.intersection(Line(Point(5,0), Point(5, 1)))
        [Point(5, 0)]
        >>> e.intersection(Line(Point(6,0), Point(6, 1)))
        []
        >>> e = Ellipse(Point(-1, 0), 4, 3)
        >>> e.intersection(Ellipse(Point(1, 0), 4, 3))
        [Point(0, -3*sqrt(15)/4), Point(0, 3*sqrt(15)/4)]
        >>> e.intersection(Ellipse(Point(5, 0), 4, 3))
        [Point(2, -3*sqrt(7)/4), Point(2, 3*sqrt(7)/4)]
        >>> e.intersection(Ellipse(Point(100500, 0), 4, 3))
        []
        >>> e.intersection(Ellipse(Point(0, 0), 3, 4))
        [Point(-363/175, -48*sqrt(111)/175), Point(-363/175, 48*sqrt(111)/175), Point(3, 0)]

        >>> e.intersection(Ellipse(Point(-1, 0), 3, 4))
        [Point(-17/5, -12/5), Point(-17/5, 12/5), Point(7/5, -12/5), Point(7/5, 12/5)]
The intersection of this ellipse and another geometrical entity
        `o`.
The intersection of this ellipse and another geometrical entity o .
def intersection(self, o):
        """The intersection of this ellipse and another geometrical entity
        `o`.

        Parameters
        ==========

        o : GeometryEntity

        Returns
        =======

        intersection : list of GeometryEntity objects

        Notes
        -----
        Currently supports intersections with Point, Line, Segment, Ray,
        Circle and Ellipse types.

        See Also
        ========

        sympy.geometry.entity.GeometryEntity

        Examples
        ========

        >>> from sympy import Ellipse, Point, Line, sqrt
        >>> e = Ellipse(Point(0, 0), 5, 7)
        >>> e.intersection(Point(0, 0))
        []
        >>> e.intersection(Point(5, 0))
        [Point(5, 0)]
        >>> e.intersection(Line(Point(0,0), Point(0, 1)))
        [Point(0, -7), Point(0, 7)]
        >>> e.intersection(Line(Point(5,0), Point(5, 1)))
        [Point(5, 0)]
        >>> e.intersection(Line(Point(6,0), Point(6, 1)))
        []
        >>> e = Ellipse(Point(-1, 0), 4, 3)
        >>> e.intersection(Ellipse(Point(1, 0), 4, 3))
        [Point(0, -3*sqrt(15)/4), Point(0, 3*sqrt(15)/4)]
        >>> e.intersection(Ellipse(Point(5, 0), 4, 3))
        [Point(2, -3*sqrt(7)/4), Point(2, 3*sqrt(7)/4)]
        >>> e.intersection(Ellipse(Point(100500, 0), 4, 3))
        []
        >>> e.intersection(Ellipse(Point(0, 0), 3, 4))
        [Point(-363/175, -48*sqrt(111)/175), Point(-363/175, 48*sqrt(111)/175), Point(3, 0)]

        >>> e.intersection(Ellipse(Point(-1, 0), 3, 4))
        [Point(-17/5, -12/5), Point(-17/5, 12/5), Point(7/5, -12/5), Point(7/5, 12/5)]
        """
        if isinstance(o, Point):
            if o in self:
                return [o]
            else:
                return []

        elif isinstance(o, LinearEntity):
            # LinearEntity may be a ray/segment, so check the points
            # of intersection for coincidence first
            return self._do_line_intersection(o)

        elif isinstance(o, Circle):
            return self._do_ellipse_intersection(o)

        elif isinstance(o, Ellipse):
            if o == self:
                return self
            else:
                return self._do_ellipse_intersection(o)

        return o.intersection(self)
def intersection ( self , o ) : if isinstance ( o , Point ) : if o in self : return [ o ] else : return [ ] elif isinstance ( o , LinearEntity ) : # LinearEntity may be a ray/segment, so check the points # of intersection for coincidence first return self . _do_line_intersection ( o ) elif isinstance ( o , Circle ) : return self . _do_ellipse_intersection ( o ) elif isinstance ( o , Ellipse ) : if o == self : return self else : return self . _do_ellipse_intersection ( o ) return o . intersection ( self )