(self)
The foci of the ellipse.

        Notes
        -----
        The foci can only be calculated if the major/minor axes are known.

        Raises
        ======

        ValueError
            When the major and minor axis cannot be determined.

        See Also
        ========

        sympy.geometry.point.Point
        focus_distance : Returns the distance between focus and center

        Examples
        ========

        >>> from sympy import Point, Ellipse
        >>> p1 = Point(0, 0)
        >>> e1 = Ellipse(p1, 3, 1)
        >>> e1.foci
        (Point(-2*sqrt(2), 0), Point(2*sqrt(2), 0))
The foci of the ellipse.
The foci of the ellipse .
def foci(self):
        """The foci of the ellipse.

        Notes
        -----
        The foci can only be calculated if the major/minor axes are known.

        Raises
        ======

        ValueError
            When the major and minor axis cannot be determined.

        See Also
        ========

        sympy.geometry.point.Point
        focus_distance : Returns the distance between focus and center

        Examples
        ========

        >>> from sympy import Point, Ellipse
        >>> p1 = Point(0, 0)
        >>> e1 = Ellipse(p1, 3, 1)
        >>> e1.foci
        (Point(-2*sqrt(2), 0), Point(2*sqrt(2), 0))

        """
        c = self.center
        hr, vr = self.hradius, self.vradius
        if hr == vr:
            return (c, c)

        # calculate focus distance manually, since focus_distance calls this
        # routine
        fd = sqrt(self.major**2 - self.minor**2)
        if hr == self.minor:
            # foci on the y-axis
            return (c + Point(0, -fd), c + Point(0, fd))
        elif hr == self.major:
            # foci on the x-axis
            return (c + Point(-fd, 0), c + Point(fd, 0))
def foci ( self ) : c = self . center hr , vr = self . hradius , self . vradius if hr == vr : return ( c , c ) # calculate focus distance manually, since focus_distance calls this # routine fd = sqrt ( self . major ** 2 - self . minor ** 2 ) if hr == self . minor : # foci on the y-axis return ( c + Point ( 0 , - fd ) , c + Point ( 0 , fd ) ) elif hr == self . major : # foci on the x-axis return ( c + Point ( - fd , 0 ) , c + Point ( fd , 0 ) )