Ë
    7^(h5�  ã                   ó.  — d Z ddlZddlmZmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZ ddlmZ ddlmZ ddlmZm Z  ddl!m"Z"m#Z#m$Z$ ddl%m&Z& ddl'm(Z(  G d„ de&«      Z) G d„ de)«      Z* G d„ de)«      Z+y)aD  Geometrical Points.

Contains
========
Point
Point2D
Point3D

When methods of Point require 1 or more points as arguments, they
can be passed as a sequence of coordinates or Points:

>>> from sympy import Point
>>> Point(1, 1).is_collinear((2, 2), (3, 4))
False
>>> Point(1, 1).is_collinear(Point(2, 2), Point(3, 4))
False

é    N)ÚSÚsympifyÚExpr)ÚAdd)ÚTuple)ÚFloat)Úglobal_parameters)Ú	nsimplifyÚsimplify)ÚGeometryError)Úsqrt)Úim)ÚcosÚsin)ÚMatrix)Ú	Transpose)ÚuniqÚis_sequence)Ú
filldedentÚ	func_nameÚUndecidableé   )ÚGeometryEntity)Úprec_to_dpsc                   ó\  — e Zd ZdZdZd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zd„ Zd„ Zd„ Zd(d„Zd„ Zd„ Zd„ Z ed„ «       Z!d„ Z"ed„ «       Z#ed„ «       Z$d „ Z%ed!„ «       Z&ed"„ «       Z'ed#„ «       Z(d$„ Z)d%„ Z*ed&„ «       Z+y'))ÚPointaÙ  A point in a n-dimensional Euclidean space.

    Parameters
    ==========

    coords : sequence of n-coordinate values. In the special
        case where n=2 or 3, a Point2D or Point3D will be created
        as appropriate.
    evaluate : if `True` (default), all floats are turn into
        exact types.
    dim : number of coordinates the point should have.  If coordinates
        are unspecified, they are padded with zeros.
    on_morph : indicates what should happen when the number of
        coordinates of a point need to be changed by adding or
        removing zeros.  Possible values are `'warn'`, `'error'`, or
        `ignore` (default).  No warning or error is given when `*args`
        is empty and `dim` is given. An error is always raised when
        trying to remove nonzero coordinates.


    Attributes
    ==========

    length
    origin: A `Point` representing the origin of the
        appropriately-dimensioned space.

    Raises
    ======

    TypeError : When instantiating with anything but a Point or sequence
    ValueError : when instantiating with a sequence with length < 2 or
        when trying to reduce dimensions if keyword `on_morph='error'` is
        set.

    See Also
    ========

    sympy.geometry.line.Segment : Connects two Points

    Examples
    ========

    >>> from sympy import Point
    >>> from sympy.abc import x
    >>> Point(1, 2, 3)
    Point3D(1, 2, 3)
    >>> Point([1, 2])
    Point2D(1, 2)
    >>> Point(0, x)
    Point2D(0, x)
    >>> Point(dim=4)
    Point(0, 0, 0, 0)

    Floats are automatically converted to Rational unless the
    evaluate flag is False:

    >>> Point(0.5, 0.25)
    Point2D(1/2, 1/4)
    >>> Point(0.5, 0.25, evaluate=False)
    Point2D(0.5, 0.25)

    Tc                 ó˜  — |j                  dt        j                  «      }|j                  dd«      }t        |«      dk(  r|d   n|}t	        |t
        «      r+d}t        |«      |j                  dt        |«      «      k(  r|S t        |«      s,t        t        dj                  t        |«      «      «      «      ‚t        |«      dk(  r5|j                  dd «      r#t        j                  f|j                  d«      z  }t        |Ž }|j                  dt        |«      «      }t        |«      d	k  rt        t        d
«      «      ‚t        |«      |k7  rcdj                  |t        |«      |«      }|dk(  rnA|dk(  rt        |«      ‚|dk(  rt        j                   |d	¬«       nt        t        d«      «      ‚t#        ||d  «      rt        d«      ‚t#        d„ |D «       «      rt        d«      ‚t%        d„ |D «       «      st        d«      ‚|d | t        j                  f|t        |«      z
  z  z   }|rG|j'                  |j)                  t*        «      D �ci c]  }|t-        t/        |d¬«      «      “Œ c}«      }t        |«      d	k(  rd|d<   t1        |i |¤ŽS t        |«      dk(  rd|d<   t3        |i |¤ŽS t5        j6                  | g|¢­Ž S c c}w )NÚevaluateÚon_morphÚignorer   r   FÚdimz<
                Expecting sequence of coordinates, not `{}`é   z[
                Point requires 2 or more coordinates or
                keyword `dim` > 1.z2Dimension of {} needs to be changed from {} to {}.ÚerrorÚwarn)Ú
stacklevelzf
                        on_morph value should be 'error',
                        'warn' or 'ignore'.z&Nonzero coordinates cannot be removed.c              3   óf   K  — | ])  }|j                   xr t        |«      j                  d u –— Œ+ y­w)FN)Ú	is_numberr   Úis_zero©Ú.0Úas     úR/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/geometry/point.pyú	<genexpr>z Point.__new__.<locals>.<genexpr>›   s)   è ø€ ÒF¸!ˆq�{‰{Ò5œr !›uŸ}™}°Ð5Ó5ÑFùs   ‚/1z(Imaginary coordinates are not permitted.c              3   ó<   K  — | ]  }t        |t        «      –— Œ y ­w©N)Ú
isinstancer   r)   s     r,   r-   z Point.__new__.<locals>.<genexpr>�   s   è ø€ Ò7¨1”:˜a¤×&Ñ7ùs   ‚z,Coordinates must be valid SymPy expressions.T)ÚrationalÚ_nochecké   )Úgetr	   r   Úlenr0   r   r   Ú	TypeErrorr   Úformatr   r   ÚZeror   Ú
ValueErrorÚwarningsr$   ÚanyÚallÚxreplaceÚatomsr   r   r
   ÚPoint2DÚPoint3Dr   Ú__new__)	ÚclsÚargsÚkwargsr   r   Úcoordsr!   ÚmessageÚfs	            r,   rA   zPoint.__new__m   s¶  € Ø—:‘:˜jÔ*;×*DÑ*DÓEˆØ—:‘:˜j¨(Ó3ˆô   ›I¨šN��a’°ˆô �fœeÔ$ð ˆHÜ�6‹{˜fŸj™j¨´°F³Ó<Ò<Ø�ä˜6Ô"ÜœJð (?ç(.©¬y¸Ó/@Ó(AóCó Dð Dô
 ˆv‹;˜!Ò §
¡
¨5°$Ô 7Ü—f‘f�Y˜vŸz™z¨%Ó0Ñ0ˆFä˜�ˆØ�j‰j˜¤ F£Ó,ˆäˆv‹;˜Š?ÜœZð )&ó 'ó (ð (ô ˆv‹;˜#Òð(ß)/©°¼¸F»ÀSÓ)Ið à˜8Ò#ØØ˜WÒ$Ü  Ó)Ð)Ø˜VÒ#Ü—‘˜g°!Ö4ä ¤ð -/ó "0ó 1ð 1ô ˆv�c�dˆ|ÔÜÐEÓFÐFÜÑF¸vÔFÔFÜÐGÓHÐHÜÑ7°Ô7Ô7ÜÐJÓKÐKð ˜˜�¤§¡ 	¨3´°V³Ñ+<Ñ =Ñ=ˆñ Ø—_‘_à Ÿ,™,¤uÓ-ö&/àð ”8œI a°$Ô7Ó8Ñ8ò&/ó 0ˆFô
 ˆv‹;˜!ÒØ!%ˆF�:ÑÜ˜FÐ- fÑ-Ð-Ü�‹[˜AÒØ!%ˆF�:ÑÜ˜FÐ- fÑ-Ð-ô ×%Ñ% cÐ3¨FÒ3Ð3ùò&/s   ÉKc                 ó^   — t        dgt        | «      z  «      }t         j                  || «      S )z7Returns the distance between this point and the origin.r   )r   r5   Údistance)ÚselfÚorigins     r,   Ú__abs__zPoint.__abs__µ   s'   € ä˜�sœ3˜t›9‘}Ó%ˆÜ�~‰~˜f dÓ+Ð+ó    c                 ó  — 	 t         j                  | t        |d¬«      «      \  }}t        ||«      D ��cg c]  \  }}t        ||z   «      ‘Œ }}}t        |d¬«      S # t        $ r t        dj	                  |«      «      ‚w xY wc c}}w )a8  Add other to self by incrementing self's coordinates by
        those of other.

        Notes
        =====

        >>> from sympy import Point

        When sequences of coordinates are passed to Point methods, they
        are converted to a Point internally. This __add__ method does
        not do that so if floating point values are used, a floating
        point result (in terms of SymPy Floats) will be returned.

        >>> Point(1, 2) + (.1, .2)
        Point2D(1.1, 2.2)

        If this is not desired, the `translate` method can be used or
        another Point can be added:

        >>> Point(1, 2).translate(.1, .2)
        Point2D(11/10, 11/5)
        >>> Point(1, 2) + Point(.1, .2)
        Point2D(11/10, 11/5)

        See Also
        ========

        sympy.geometry.point.Point.translate

        F©r   z+Don't know how to add {} and a Point object)r   Ú_normalize_dimensionr6   r   r7   Úzipr   )rJ   ÚotherÚsÚor+   ÚbrE   s          r,   Ú__add__zPoint.__add__º   sˆ   € ð>	]Ü×-Ñ-¨d´E¸%È%Ô4PÓQ‰DˆAˆqô /2°!°Q«i×8¡d a¨”(˜1˜q™5•/Ð8ˆÑ8Ü�V eÔ,Ð,øô	 ò 	]ÜÐ M× TÑ TÐUZÓ [Ó\Ð\ð	]üó 9s   ‚$A µBÁ$Bc                 ó   — || j                   v S r/   ©rC   ©rJ   Úitems     r,   Ú__contains__zPoint.__contains__á   s   € Ø�t—y‘yÐ Ð rM   c                 ó†   — t        |«      }| j                  D �cg c]  }t        ||z  «      ‘Œ }}t        |d¬«      S c c}w )z'Divide point's coordinates by a factor.FrO   ©r   rC   r   r   )rJ   ÚdivisorÚxrE   s       r,   Ú__truediv__zPoint.__truediv__ä   s>   € ä˜'Ó"ˆØ/3¯y©yÖ9¨!”(˜1˜W™9Õ%Ð9ˆÐ9Ü�V eÔ,Ð,ùò :ó   š>c                 ó¬   — t        |t        «      r+t        | j                  «      t        |j                  «      k7  ry| j                  |j                  k(  S )NF)r0   r   r5   rC   ©rJ   rR   s     r,   Ú__eq__zPoint.__eq__ê   s9   € Ü˜%¤Ô'¬3¨t¯y©y«>¼SÀÇÁ»_Ò+LØØ�y‰y˜EŸJ™JÑ&Ð&rM   c                 ó    — | j                   |   S r/   rX   )rJ   Úkeys     r,   Ú__getitem__zPoint.__getitem__ï   s   € Ø�y‰y˜‰~ÐrM   c                 ó,   — t        | j                  «      S r/   )ÚhashrC   ©rJ   s    r,   Ú__hash__zPoint.__hash__ò   s   € Ü�D—I‘I‹ÐrM   c                 ó6   — | j                   j                  «       S r/   )rC   Ú__iter__rj   s    r,   rm   zPoint.__iter__õ   s   € Ø�y‰y×!Ñ!Ó#Ð#rM   c                 ó,   — t        | j                  «      S r/   )r5   rC   rj   s    r,   Ú__len__zPoint.__len__ø   s   € Ü�4—9‘9‹~ÐrM   c                 ó†   — t        |«      }| j                  D �cg c]  }t        ||z  «      ‘Œ }}t        |d¬«      S c c}w )al  Multiply point's coordinates by a factor.

        Notes
        =====

        >>> from sympy import Point

        When multiplying a Point by a floating point number,
        the coordinates of the Point will be changed to Floats:

        >>> Point(1, 2)*0.1
        Point2D(0.1, 0.2)

        If this is not desired, the `scale` method can be used or
        else only multiply or divide by integers:

        >>> Point(1, 2).scale(1.1, 1.1)
        Point2D(11/10, 11/5)
        >>> Point(1, 2)*11/10
        Point2D(11/10, 11/5)

        See Also
        ========

        sympy.geometry.point.Point.scale
        FrO   r]   )rJ   Úfactorr_   rE   s       r,   Ú__mul__zPoint.__mul__û   s?   € ô6 ˜“ˆØ.2¯i©iÖ8¨”(˜1˜V™8Õ$Ð8ˆÐ8Ü�V eÔ,Ð,ùò 9ra   c                 ó$   — | j                  |«      S )z)Multiply a factor by point's coordinates.)rr   )rJ   rq   s     r,   Ú__rmul__zPoint.__rmul__  s   € à�|‰|˜FÓ#Ð#rM   c                 óZ   — | j                   D �cg c]  }| ‘Œ }}t        |d¬«      S c c}w )zNegate the point.FrO   )rC   r   )rJ   r_   rE   s      r,   Ú__neg__zPoint.__neg__  s-   € à"Ÿi™iÖ(˜�1’"Ð(ˆÐ(Ü�V eÔ,Ð,ùò )s   �
(c                 ó4   — | |D �cg c]  }| ‘Œ c}z   S c c}w )zPSubtract two points, or subtract a factor from this point's
        coordinates.© )rJ   rR   r_   s      r,   Ú__sub__zPoint.__sub__#  s   € ð  5Ö)˜a˜’rÒ)Ñ)Ð)ùÒ)s   †
c                 ó  ‡— t        | dd«      Š|j                  d‰«      Š‰€t        d„ |D «       «      Št        ˆfd„|D «       «      rt	        |«      S ‰|d<   |j                  dd«      |d<   |D �cg c]  }t        |fi |¤Ž‘Œ c}S c c}w )z~Ensure that points have the same dimension.
        By default `on_morph='warn'` is passed to the
        `Point` constructor.Ú_ambient_dimensionNr!   c              3   ó4   K  — | ]  }|j                   –— Œ y ­wr/   ©Úambient_dimension©r*   Úis     r,   r-   z-Point._normalize_dimension.<locals>.<genexpr>3  s   è ø€ Ò:¨a�a×)Õ)Ñ:ùs   ‚c              3   ó<   •K  — | ]  }|j                   ‰k(  –— Œ y ­wr/   r}   )r*   r€   r!   s     €r,   r-   z-Point._normalize_dimension.<locals>.<genexpr>4  s   øè ø€ Ò:¨aˆq×"Ñ" cÕ)Ñ:ùs   ƒr   r$   )Úgetattrr4   Úmaxr<   Úlistr   )rB   ÚpointsrD   r€   r!   s       @r,   rP   zPoint._normalize_dimension(  s�   ø€ ô �cÐ/°Ó6ˆà�j‰j˜ Ó$ˆàˆ;ÜÑ:°6Ô:Ó:ˆCÜÓ:°6Ô:Ô:Ü˜“<ÐØˆˆu‰Ø#ŸZ™Z¨
°FÓ;ˆˆzÑØ,2Ö3 q”�aÑ"˜6Ó"Ò3Ð3ùÒ3s   Á2Bc                  ó0  — t        | «      dk(  ryt        j                  | D �cg c]  }t        |«      ‘Œ c}Ž }|d   }|dd D �cg c]  }||z
  ‘Œ	 }}t        |D �cg c]  }|j                  ‘Œ c}«      }|j                  d„ ¬«      S c c}w c c}w c c}w )ag  The affine rank of a set of points is the dimension
        of the smallest affine space containing all the points.
        For example, if the points lie on a line (and are not all
        the same) their affine rank is 1.  If the points lie on a plane
        but not a line, their affine rank is 2.  By convention, the empty
        set has affine rank -1.r   éÿÿÿÿr   Nc                 ól   — | j                   rt        | j                  d«      «      dk  S | j                  S )Nr"   gê-�™—q=)r'   ÚabsÚnr(   )r_   s    r,   ú<lambda>z#Point.affine_rank.<locals>.<lambda>M  s-   € Ø#$§;¢;ŒC�—‘�A“‹K˜%Ñð Ø45·I±Ið rM   )Ú
iszerofunc)r5   r   rP   r   rC   Úrank)rC   r€   r…   rK   Úms        r,   Úaffine_rankzPoint.affine_rank:  s–   € ô ˆt‹9˜Š>Øô ×+Ñ+ÀÖ-E¸1¬e°A­hÒ-EÐFˆØ˜‘ˆØ&,¨Q¨R jÖ1 �!�f“*Ð1ˆÐ1ä FÖ+˜q�A—F“FÒ+Ó,ˆà�v‰vñ $>ˆvó ?ð 	?ùò .Fùâ1ùâ+s   £B	ÁBÁBc                 ó.   — t        | dt        | «      «      S )z$Number of components this point has.r{   )r‚   r5   rj   s    r,   r~   zPoint.ambient_dimensionP  s   € ô �tÐ1´3°t³9Ó=Ð=rM   c                 óî   — t        |«      dk  ry | j                  |D �cg c]  }t        |«      ‘Œ c}Ž }|d   j                  dk(  ryt	        t        |«      «      }t        j                  |Ž dk  S c c}w )añ  Return True if there exists a plane in which all the points
        lie.  A trivial True value is returned if `len(points) < 3` or
        all Points are 2-dimensional.

        Parameters
        ==========

        A set of points

        Raises
        ======

        ValueError : if less than 3 unique points are given

        Returns
        =======

        boolean

        Examples
        ========

        >>> from sympy import Point3D
        >>> p1 = Point3D(1, 2, 2)
        >>> p2 = Point3D(2, 7, 2)
        >>> p3 = Point3D(0, 0, 2)
        >>> p4 = Point3D(1, 1, 2)
        >>> Point3D.are_coplanar(p1, p2, p3, p4)
        True
        >>> p5 = Point3D(0, 1, 3)
        >>> Point3D.are_coplanar(p1, p2, p3, p5)
        False

        r   Tr   r"   )r5   rP   r   r~   r„   r   r�   )rB   r…   r€   s      r,   Úare_coplanarzPoint.are_coplanarU  st   € ôH ˆv‹;˜!ÒØà)�×)Ñ)¸fÖ+E¸¬E°!­HÒ+EÐFˆà�!‰9×&Ñ&¨!Ò+ØÜ”d˜6“lÓ#ˆÜ× Ñ  &Ð)¨QÑ.Ð.ùò ,Fs    A2c           	      óž  — t        |t        «      s	 t        || j                  ¬«      }t        |t        «      rDt        j                  | t        |«      «      \  }}t        t        d„ t        ||«      D «       Ž «      S t        |dd«      }|€t	        dt        |«      z  «      ‚ || «      S # t        $ r t	        dt        |«      z  «      ‚w xY w)az  The Euclidean distance between self and another GeometricEntity.

        Returns
        =======

        distance : number or symbolic expression.

        Raises
        ======

        TypeError : if other is not recognized as a GeometricEntity or is a
                    GeometricEntity for which distance is not defined.

        See Also
        ========

        sympy.geometry.line.Segment.length
        sympy.geometry.point.Point.taxicab_distance

        Examples
        ========

        >>> from sympy import Point, Line
        >>> p1, p2 = Point(1, 1), Point(4, 5)
        >>> l = Line((3, 1), (2, 2))
        >>> p1.distance(p2)
        5
        >>> p1.distance(l)
        sqrt(2)

        The computed distance may be symbolic, too:

        >>> from sympy.abc import x, y
        >>> p3 = Point(x, y)
        >>> p3.distance((0, 0))
        sqrt(x**2 + y**2)

        ©r!   z'not recognized as a GeometricEntity: %sc              3   ó2   K  — | ]  \  }}||z
  d z  –— Œ y­w©r"   Nrx   ©r*   r+   rU   s      r,   r-   z!Point.distance.<locals>.<genexpr>±  s   è ø€ Ò?©T¨Q°˜q 1™u q�jÑ?ùs   ‚rI   Nz,distance between Point and %s is not defined)r0   r   r   r~   r6   ÚtyperP   r   r   rQ   r‚   )rJ   rR   rS   ÚprI   s        r,   rI   zPoint.distanceƒ  sÆ   € ôN ˜%¤Ô0ðYÜ˜e¨×)?Ñ)?Ô@�ô �eœUÔ#Ü×-Ñ-¨d´E¸%³LÓA‰DˆAˆqÜœÑ?´S¸¸A³YÔ?Ð@ÓAÐAÜ˜5 *¨dÓ3ˆØÐÜÐJÌTÐRWË[ÑXÓYÐYÙ˜‹~Ðøô ò YÜÐ IÌDÐQVËKÑ WÓXÐXðYús   ’B+ Â+!Cc                 ó`   — t        |«      st        |«      }t        d„ t        | |«      D «       Ž S )z.Return dot product of self with another Point.c              3   ó,   K  — | ]  \  }}||z  –— Œ y ­wr/   rx   r—   s      r,   r-   zPoint.dot.<locals>.<genexpr>»  s   è ø€ Ò2™T˜Q �Q�q•SÑ2ùs   ‚)r   r   r   rQ   )rJ   r™   s     r,   Údotz	Point.dot·  s)   € ä˜1Œ~Ü�a“ˆAÜÑ2¤S¨¨q£\Ô2Ð3Ð3rM   c                 óŠ   — t        |t        «      rt        | «      t        |«      k7  ryt        d„ t	        | |«      D «       «      S )z8Returns whether the coordinates of self and other agree.Fc              3   óD   K  — | ]  \  }}|j                  |«      –— Œ y ­wr/   )Úequalsr—   s      r,   r-   zPoint.equals.<locals>.<genexpr>Â  s   è ø€ Ò<¡4 1 a�1—8‘8˜A—;Ñ<ùs   ‚ )r0   r   r5   r<   rQ   rc   s     r,   rŸ   zPoint.equals½  s8   € ô ˜%¤Ô'¬3¨t«9¼¸E»
Ò+BØÜÑ<¬3¨t°UÓ+;Ô<Ó<Ð<rM   c                 óŽ   — t        |«      }| j                  D �cg c]  } |j                  dd|i|¤Ž‘Œ }}t        |ddiŽS c c}w )aF  Evaluate the coordinates of the point.

        This method will, where possible, create and return a new Point
        where the coordinates are evaluated as floating point numbers to
        the precision indicated (default=15).

        Parameters
        ==========

        prec : int

        Returns
        =======

        point : Point

        Examples
        ========

        >>> from sympy import Point, Rational
        >>> p1 = Point(Rational(1, 2), Rational(3, 2))
        >>> p1
        Point2D(1/2, 3/2)
        >>> p1.evalf()
        Point2D(0.5, 1.5)

        rŠ   r   Frx   )r   rC   Úevalfr   )rJ   ÚprecÚoptionsÚdpsr_   rE   s         r,   Ú_eval_evalfzPoint._eval_evalfÄ  sN   € ô8 ˜$ÓˆØ59·Y±YÖ?°�'�!—'‘'Ñ+˜CÐ+ 7Ó+Ð?ˆÐ?Ü�fÐ- uÑ-Ð-ùò @s   šAc                 óÚ   — t        |t        «      st        |«      }t        |t        «      r0| |k(  r| gS t        j                  | |«      \  }}|| k(  r||k(  r| gS g S |j	                  | «      S )a|  The intersection between this point and another GeometryEntity.

        Parameters
        ==========

        other : GeometryEntity or sequence of coordinates

        Returns
        =======

        intersection : list of Points

        Notes
        =====

        The return value will either be an empty list if there is no
        intersection, otherwise it will contain this point.

        Examples
        ========

        >>> from sympy import Point
        >>> p1, p2, p3 = Point(0, 0), Point(1, 1), Point(0, 0)
        >>> p1.intersection(p2)
        []
        >>> p1.intersection(p3)
        [Point2D(0, 0)]

        )r0   r   r   rP   Úintersection)rJ   rR   Úp1Úp2s       r,   r§   zPoint.intersectionä  so   € ô< ˜%¤Ô0Ü˜%“LˆEÜ�eœUÔ#Ø�uŠ}Ø�v�Ü×/Ñ/°°eÓ<‰FˆB�Ø�TŠz˜b BšhØ�v�ØˆIØ×!Ñ! $Ó'Ð'rM   c                 ó¼   — | f|z   }t        j                  |D �cg c]  }t        |«      ‘Œ c}Ž }t        t        |«      «      }t        j                  |Ž dk  S c c}w )aÛ  Returns `True` if there exists a line
        that contains `self` and `points`.  Returns `False` otherwise.
        A trivially True value is returned if no points are given.

        Parameters
        ==========

        args : sequence of Points

        Returns
        =======

        is_collinear : boolean

        See Also
        ========

        sympy.geometry.line.Line

        Examples
        ========

        >>> from sympy import Point
        >>> from sympy.abc import x
        >>> p1, p2 = Point(0, 0), Point(1, 1)
        >>> p3, p4, p5 = Point(2, 2), Point(x, x), Point(1, 2)
        >>> Point.is_collinear(p1, p2, p3, p4)
        True
        >>> Point.is_collinear(p1, p2, p3, p5)
        False

        r   )r   rP   r„   r   r�   )rJ   rC   r…   r€   s       r,   Úis_collinearzPoint.is_collinear  sY   € ðB �˜4‘ˆÜ×+Ñ+ÀÖ-G¸1¬e°A­hÒ-GÐHˆÜ”d˜6“lÓ#ˆÜ× Ñ  &Ð)¨QÑ.Ð.ùò .Hs   šAc           	      ó®  — | f|z   }t        j                  |D �cg c]  }t        |«      ‘Œ c}Ž }t        t        |«      «      }t        j                  |Ž dk  sy|d   }|D �cg c]  }||z
  ‘Œ	 }}t        |D �cg c]   }t        |«      |j                  |«      gz   ‘Œ" c}«      }|j                  «       \  }}t        |«      |vryyc c}w c c}w c c}w )a  Do `self` and the given sequence of points lie in a circle?

        Returns True if the set of points are concyclic and
        False otherwise. A trivial value of True is returned
        if there are fewer than 2 other points.

        Parameters
        ==========

        args : sequence of Points

        Returns
        =======

        is_concyclic : boolean


        Examples
        ========

        >>> from sympy import Point

        Define 4 points that are on the unit circle:

        >>> p1, p2, p3, p4 = Point(1, 0), (0, 1), (-1, 0), (0, -1)

        >>> p1.is_concyclic() == p1.is_concyclic(p2, p3, p4) == True
        True

        Define a point not on that circle:

        >>> p = Point(1, 1)

        >>> p.is_concyclic(p1, p2, p3)
        False

        r"   Fr   T)	r   rP   r„   r   r�   r   rœ   Úrrefr5   )	rJ   rC   r…   r€   rK   r™   Úmatr­   Úpivotss	            r,   Úis_concycliczPoint.is_concyclic3  sÎ   € ðL �˜4‘ˆÜ×+Ñ+ÀÖ-G¸1¬e°A­hÒ-GÐHˆÜ”d˜6“lÓ#ˆÜ× Ñ  &Ð)¨QÒ.ØØ˜‘ˆØ&,Ö- �!�f“*Ð-ˆÐ-ô °FÖ;¨q”d˜1“g §¡ q£ 
Ó*Ò;Ó<ˆØ—x‘x“z‰ˆˆfÜˆv‹;˜fÑ$ØØùò .Hùò
 .ùò <s   šCÁ#CÁ:%Cc                 ó&   — | j                   }|€y| S )zrTrue if any coordinate is nonzero, False if every coordinate is zero,
        and None if it cannot be determined.N)r(   )rJ   r(   s     r,   Ú
is_nonzerozPoint.is_nonzerok  s   € ð —,‘,ˆØˆ?ØØˆ{ÐrM   c                 óv  — t         j                  | t        |«      «      \  }}|j                  dk(  rU|j                  |j                  c\  }}\  }}||z  ||z  z
  j	                  d«      }|€t        t        d|›d|›�«      «      ‚t        |j                  |j                  g«      }	|	j                  «       dk  S )z{Returns whether each coordinate of `self` is a scalar
        multiple of the corresponding coordinate in point p.
        r"   r   zCannot determine if z- is a scalar multiple of
                    )	r   rP   r~   rC   rŸ   r   r   r   r�   )
rJ   r™   rS   rT   Úx1Úy1Úx2Úy2ÚrvrŽ   s
             r,   Úis_scalar_multiplezPoint.is_scalar_multiplet  s°   € ô ×)Ñ)¨$´°a³Ó9‰ˆˆ1à×Ñ !Ò#Ø!"§¡¨¯©Ð‰HˆR�‘h�r˜2Ø�R‘%˜"˜R™%‘-×'Ñ'¨Ó*ˆBØˆzÜ!¥*â¡ð#ó#$ó %ð %ô �A—F‘F˜AŸF™FÐ#Ó$ˆØ�v‰v‹x˜!‰|ÐrM   c                 ó’   — | j                   D �cg c]  }|j                  ‘Œ }}t        |«      ryt        d„ |D «       «      ryyc c}w )zsTrue if every coordinate is zero, False if any coordinate is not zero,
        and None if it cannot be determined.Fc              3   ó$   K  — | ]  }|d u –— Œ
 y ­wr/   rx   )r*   r_   s     r,   r-   z Point.is_zero.<locals>.<genexpr>Ž  s   è ø€ Ò*˜Qˆq�DŒyÑ*ùs   ‚NT)rC   r²   r;   )rJ   r_   Únonzeros      r,   r(   zPoint.is_zero‡  sB   € ð *.¯©Ö3 A�1—<“<Ð3ˆÐ3ÜˆwŒ<ØÜÑ* 'Ô*Ô*ØØùò 4s   �Ac                 ó"   — t         j                  S )zÚ
        Treating a Point as a Line, this returns 0 for the length of a Point.

        Examples
        ========

        >>> from sympy import Point
        >>> p = Point(0, 1)
        >>> p.length
        0
        )r   r8   rj   s    r,   ÚlengthzPoint.length’  s   € ô �v‰vˆrM   c           
      óÜ   — t         j                  | t        |«      «      \  }}t        t        ||«      D ��cg c]$  \  }}t        ||z   t        j
                  z  «      ‘Œ& c}}«      S c c}}w )aŸ  The midpoint between self and point p.

        Parameters
        ==========

        p : Point

        Returns
        =======

        midpoint : Point

        See Also
        ========

        sympy.geometry.line.Segment.midpoint

        Examples
        ========

        >>> from sympy import Point
        >>> p1, p2 = Point(1, 1), Point(13, 5)
        >>> p1.midpoint(p2)
        Point2D(7, 3)

        )r   rP   rQ   r   r   ÚHalf)rJ   r™   rS   r+   rU   s        r,   ÚmidpointzPoint.midpoint¡  sR   € ô6 ×)Ñ)¨$´°a³Ó9‰ˆˆ1Ü¼3¸qÀ!»9×E±4°1°a”h  A¡¤q§v¡v™~Õ.ÓEÓFÐFùÓEs   ·)A(
c                 ó6   — t        dgt        | «      z  d¬«      S )zOA point of all zeros of the same ambient dimension
        as the current pointr   FrO   )r   r5   rj   s    r,   rK   zPoint.origin¿  s   € ô �a�Sœ˜T›‘]¨UÔ3Ð3rM   c                 óì   — | j                   }| d   j                  rt        dg|dz
  dgz  z   «      S | d   j                  rt        ddg|dz
  dgz  z   «      S t        | d    | d   g|dz
  dgz  z   «      S )au  Returns a non-zero point that is orthogonal to the
        line containing `self` and the origin.

        Examples
        ========

        >>> from sympy import Line, Point
        >>> a = Point(1, 2, 3)
        >>> a.orthogonal_direction
        Point3D(-2, 1, 0)
        >>> b = _
        >>> Line(b, b.origin).is_perpendicular(Line(a, a.origin))
        True
        r   r   r"   )r~   r(   r   )rJ   r!   s     r,   Úorthogonal_directionzPoint.orthogonal_directionÅ  sŠ   € ð  ×$Ñ$ˆà�‰7�?Š?Ü˜!˜  a¡¨!¨™}Ñ,Ó-Ð-Ø�‰7�?Š?Ü˜!˜A˜ #¨¡'¨A¨3¡Ñ.Ó/Ð/ô �t˜A‘w�h  Q¡Ð(¨C°!©G°a°S©=Ñ8Ó9Ð9rM   c                 óÒ   — t         j                  t        | «      t        |«      «      \  } }|j                  rt        d«      ‚|| j	                  |«      |j	                  |«      z  z  S )a‚  Project the point `a` onto the line between the origin
        and point `b` along the normal direction.

        Parameters
        ==========

        a : Point
        b : Point

        Returns
        =======

        p : Point

        See Also
        ========

        sympy.geometry.line.LinearEntity.projection

        Examples
        ========

        >>> from sympy import Line, Point
        >>> a = Point(1, 2)
        >>> b = Point(2, 5)
        >>> z = a.origin
        >>> p = Point.project(a, b)
        >>> Line(p, a).is_perpendicular(Line(p, b))
        True
        >>> Point.is_collinear(z, p, b)
        True
        ú"Cannot project to the zero vector.)r   rP   r(   r9   rœ   )r+   rU   s     r,   ÚprojectzPoint.projectß  sV   € ôD ×)Ñ)¬%°«(´E¸!³HÓ=‰ˆˆ1Ø�9Š9ÜÐAÓBÐBØ�!—%‘%˜“(˜QŸU™U 1›XÑ%Ñ&Ð&rM   c                 óx   — t         j                  | t        |«      «      \  }}t        d„ t        ||«      D «       Ž S )a2  The Taxicab Distance from self to point p.

        Returns the sum of the horizontal and vertical distances to point p.

        Parameters
        ==========

        p : Point

        Returns
        =======

        taxicab_distance : The sum of the horizontal
        and vertical distances to point p.

        See Also
        ========

        sympy.geometry.point.Point.distance

        Examples
        ========

        >>> from sympy import Point
        >>> p1, p2 = Point(1, 1), Point(4, 5)
        >>> p1.taxicab_distance(p2)
        7

        c              3   ó>   K  — | ]  \  }}t        ||z
  «      –— Œ y ­wr/   ©r‰   r—   s      r,   r-   z)Point.taxicab_distance.<locals>.<genexpr>%  s   è ø€ Ò6¡D A q”S˜˜Q™—ZÑ6ùs   ‚)r   rP   r   rQ   ©rJ   r™   rS   s      r,   Útaxicab_distancezPoint.taxicab_distance  s5   € ô< ×)Ñ)¨$´°a³Ó9‰ˆˆ1ÜÑ6¬C°°1«IÔ6Ð7Ð7rM   c                 ó¾   — t         j                  | t        |«      «      \  }}| j                  r|j                  rt        d«      ‚t	        d„ t        ||«      D «       Ž S )a=  The Canberra Distance from self to point p.

        Returns the weighted sum of horizontal and vertical distances to
        point p.

        Parameters
        ==========

        p : Point

        Returns
        =======

        canberra_distance : The weighted sum of horizontal and vertical
        distances to point p. The weight used is the sum of absolute values
        of the coordinates.

        Examples
        ========

        >>> from sympy import Point
        >>> p1, p2 = Point(1, 1), Point(3, 3)
        >>> p1.canberra_distance(p2)
        1
        >>> p1, p2 = Point(0, 0), Point(3, 3)
        >>> p1.canberra_distance(p2)
        2

        Raises
        ======

        ValueError when both vectors are zero.

        See Also
        ========

        sympy.geometry.point.Point.distance

        rÆ   c              3   ón   K  — | ]-  \  }}t        ||z
  «      t        |«      t        |«      z   z  –— Œ/ y ­wr/   rÊ   r—   s      r,   r-   z*Point.canberra_distance.<locals>.<genexpr>S  s-   è ø€ ÒJ¹¸¸1”c˜!˜a™%“j¤# a£&¬3¨q«6¡/Õ2ÑJùs   ‚35)r   rP   r(   r9   r   rQ   rË   s      r,   Úcanberra_distancezPoint.canberra_distance'  sO   € ôR ×)Ñ)¨$´°a³Ó9‰ˆˆ1Ø�<Š<˜AŸIšIÜÐAÓBÐBÜÑJÄÀAÀqÃ	ÔJÐKÐKrM   c                 ó   — | t        | «      z  S )zdReturn the Point that is in the same direction as `self`
        and a distance of 1 from the originrÊ   rj   s    r,   Úunitz
Point.unitU  s   € ð ”c˜$“iÑÐrM   N)é   ),Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úis_PointrA   rL   rV   r[   r`   rd   rg   rk   rm   ro   rr   rt   rv   ry   ÚclassmethodrP   Ústaticmethodr�   Úpropertyr~   r’   rI   rœ   rŸ   r¥   r§   r«   r°   r²   r¹   r(   r¾   rÁ   rK   rÄ   rÇ   rÌ   rÏ   rÑ   rx   rM   r,   r   r   *   sv  „ ñ>ð@ €HòF4òP,ò
%-òN!ò-ò'ò
òò$òò-ò>$ò-ò
*ð
 ñ4ó ð4ð" ñ?ó ð?ð* ñ>ó ð>ð ñ+/ó ð+/òZ2òh4ò=ó.ò@'(òR$/òL6ðp ñó ðòð& ñó ðð ñó ðòGð< ñ4ó ð4ð
 ñ:ó ð:ð2 ñ$'ó ð$'òL8òB,Lð\ ñ ó ñ rM   r   c                   ó„   — e Zd ZdZdZddœd„Zd„ Zed„ «       Zdd	„Z	dd
„Z
d„ Zdd„Zed„ «       Zed„ «       Zed„ «       Zy)r?   a±  A point in a 2-dimensional Euclidean space.

    Parameters
    ==========

    coords
        A sequence of 2 coordinate values.

    Attributes
    ==========

    x
    y
    length

    Raises
    ======

    TypeError
        When trying to add or subtract points with different dimensions.
        When trying to create a point with more than two dimensions.
        When `intersection` is called with object other than a Point.

    See Also
    ========

    sympy.geometry.line.Segment : Connects two Points

    Examples
    ========

    >>> from sympy import Point2D
    >>> from sympy.abc import x
    >>> Point2D(1, 2)
    Point2D(1, 2)
    >>> Point2D([1, 2])
    Point2D(1, 2)
    >>> Point2D(0, x)
    Point2D(0, x)

    Floats are automatically converted to Rational unless the
    evaluate flag is False:

    >>> Point2D(0.5, 0.25)
    Point2D(1/2, 1/4)
    >>> Point2D(0.5, 0.25, evaluate=False)
    Point2D(0.5, 0.25)

    r"   F©r2   c                óR   — |sd|d<   t        |i |¤Ž}t        j                  | g|¢­Ž S )Nr"   r!   ©r   r   rA   ©rB   r2   rC   rD   s       r,   rA   zPoint2D.__new__‘  ó3   € ÙØˆF�5‰MÜ˜$Ð) &Ñ)ˆDÜ×%Ñ% cÐ1¨DÒ1Ð1rM   c                 ó   — || k(  S r/   rx   rY   s     r,   r[   zPoint2D.__contains__—  ó   € Ø�t‰|ÐrM   c                 ó^   — | j                   | j                  | j                   | j                  fS )zwReturn a tuple (xmin, ymin, xmax, ymax) representing the bounding
        rectangle for the geometric figure.

        )r_   Úyrj   s    r,   ÚboundszPoint2D.boundsš  s#   € ð —‘˜Ÿ™ §¡¨¯©Ð/Ð/rM   Nc                 óÆ   — t        |«      }t        |«      }| }|�t        |d¬«      }||z  }|j                  \  }}t        ||z  ||z  z
  ||z  ||z  z   «      }|�||z  }|S )a[  Rotate ``angle`` radians counterclockwise about Point ``pt``.

        See Also
        ========

        translate, scale

        Examples
        ========

        >>> from sympy import Point2D, pi
        >>> t = Point2D(1, 0)
        >>> t.rotate(pi/2)
        Point2D(0, 1)
        >>> t.rotate(pi/2, (2, 0))
        Point2D(2, -1)

        r"   r”   )r   r   r   rC   )rJ   ÚangleÚptÚcrS   r¸   r_   rä   s           r,   ÚrotatezPoint2D.rotate£  sy   € ô& �‹JˆÜ�‹JˆàˆØˆ>Ü�r˜qÔ!ˆBØ�"‰HˆBØ�w‰w‰ˆˆ1Ü�1�Q‘3˜˜1™‘9˜a ™c A a¡C™iÓ(ˆØˆ>Ø�"‰HˆBØˆ	rM   c                 óî   — |rNt        |d¬«      }  | j                  | j                  Ž j                  ||«      j                  |j                  Ž S t        | j                  |z  | j
                  |z  «      S )aõ  Scale the coordinates of the Point by multiplying by
        ``x`` and ``y`` after subtracting ``pt`` -- default is (0, 0) --
        and then adding ``pt`` back again (i.e. ``pt`` is the point of
        reference for the scaling).

        See Also
        ========

        rotate, translate

        Examples
        ========

        >>> from sympy import Point2D
        >>> t = Point2D(1, 1)
        >>> t.scale(2)
        Point2D(2, 1)
        >>> t.scale(2, 2)
        Point2D(2, 2)

        r"   r”   )r   Ú	translaterC   Úscaler_   rä   )rJ   r_   rä   rè   s       r,   rí   zPoint2D.scaleÃ  se   € ñ, Ü�r˜qÔ!ˆBØD�>�4—>‘> R C§:¡:Ð.×4Ñ4°Q¸Ó:×DÑDÀbÇgÁgÐNÐNÜ�T—V‘V˜A‘X˜tŸv™v a™xÓ(Ð(rM   c           	      óÆ   — |j                   r|j                  dk(  st        d«      ‚| j                  \  }}t	        t        dd||dg«      |z  j                  «       d   dd Ž S )a  Return the point after applying the transformation described
        by the 3x3 Matrix, ``matrix``.

        See Also
        ========
        sympy.geometry.point.Point2D.rotate
        sympy.geometry.point.Point2D.scale
        sympy.geometry.point.Point2D.translate
        )r3   r3   zmatrix must be a 3x3 matrixr   r3   r   Nr"   )Ú	is_MatrixÚshaper9   rC   r   r   Útolist)rJ   Úmatrixr_   rä   s       r,   Ú	transformzPoint2D.transformÞ  se   € ð × Ò  V§\¡\°VÒ%;ÜÐ:Ó;Ð;Ø�y‰y‰ˆˆ1Ü”v˜a  Q¨¨1 IÓ.¨vÑ5×=Ñ=Ó?ÀÑBÀ2ÀAÐFÐGÐGrM   c                 óN   — t        | j                  |z   | j                  |z   «      S )a¤  Shift the Point by adding x and y to the coordinates of the Point.

        See Also
        ========

        sympy.geometry.point.Point2D.rotate, scale

        Examples
        ========

        >>> from sympy import Point2D
        >>> t = Point2D(0, 1)
        >>> t.translate(2)
        Point2D(2, 1)
        >>> t.translate(2, 2)
        Point2D(2, 3)
        >>> t + Point2D(2, 2)
        Point2D(2, 3)

        )r   r_   rä   )rJ   r_   rä   s      r,   rì   zPoint2D.translateí  s!   € ô* �T—V‘V˜a‘Z §¡¨!¡Ó,Ð,rM   c                 ó   — | j                   S )zÌ
        Returns the two coordinates of the Point.

        Examples
        ========

        >>> from sympy import Point2D
        >>> p = Point2D(0, 1)
        >>> p.coordinates
        (0, 1)
        rX   rj   s    r,   ÚcoordinateszPoint2D.coordinates  ó   € ð �y‰yÐrM   c                 ó    — | j                   d   S )zº
        Returns the X coordinate of the Point.

        Examples
        ========

        >>> from sympy import Point2D
        >>> p = Point2D(0, 1)
        >>> p.x
        0
        r   rX   rj   s    r,   r_   z	Point2D.x  ó   € ð �y‰y˜‰|ÐrM   c                 ó    — | j                   d   S )zº
        Returns the Y coordinate of the Point.

        Examples
        ========

        >>> from sympy import Point2D
        >>> p = Point2D(0, 1)
        >>> p.y
        1
        r   rX   rj   s    r,   rä   z	Point2D.y"  rù   rM   r/   )r   r   N)r   r   )rÓ   rÔ   rÕ   rÖ   r{   rA   r[   rÚ   rå   rê   rí   ró   rì   rö   r_   rä   rx   rM   r,   r?   r?   \  sƒ   „ ñ0ðd Ðà%*ô 2òð ñ0ó ð0óó@)ò6Hó-ð. ñó ðð ñó ðð ñó ñrM   r?   c                   óž   — e Zd ZdZdZddœd„Zd„ Zed„ «       Zd„ Z	d	„ Z
d
„ Zdd„Zd„ Zdd„Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zy)r@   a>  A point in a 3-dimensional Euclidean space.

    Parameters
    ==========

    coords
        A sequence of 3 coordinate values.

    Attributes
    ==========

    x
    y
    z
    length

    Raises
    ======

    TypeError
        When trying to add or subtract points with different dimensions.
        When `intersection` is called with object other than a Point.

    Examples
    ========

    >>> from sympy import Point3D
    >>> from sympy.abc import x
    >>> Point3D(1, 2, 3)
    Point3D(1, 2, 3)
    >>> Point3D([1, 2, 3])
    Point3D(1, 2, 3)
    >>> Point3D(0, x, 3)
    Point3D(0, x, 3)

    Floats are automatically converted to Rational unless the
    evaluate flag is False:

    >>> Point3D(0.5, 0.25, 2)
    Point3D(1/2, 1/4, 2)
    >>> Point3D(0.5, 0.25, 3, evaluate=False)
    Point3D(0.5, 0.25, 3)

    r3   FrÜ   c                óR   — |sd|d<   t        |i |¤Ž}t        j                  | g|¢­Ž S )Nr3   r!   rÞ   rß   s       r,   rA   zPoint3D.__new__a  rà   rM   c                 ó   — || k(  S r/   rx   rY   s     r,   r[   zPoint3D.__contains__g  râ   rM   c                  ó&   — t        j                  | Ž S )aû  Is a sequence of points collinear?

        Test whether or not a set of points are collinear. Returns True if
        the set of points are collinear, or False otherwise.

        Parameters
        ==========

        points : sequence of Point

        Returns
        =======

        are_collinear : boolean

        See Also
        ========

        sympy.geometry.line.Line3D

        Examples
        ========

        >>> from sympy import Point3D
        >>> from sympy.abc import x
        >>> p1, p2 = Point3D(0, 0, 0), Point3D(1, 1, 1)
        >>> p3, p4, p5 = Point3D(2, 2, 2), Point3D(x, x, x), Point3D(1, 2, 6)
        >>> Point3D.are_collinear(p1, p2, p3, p4)
        True
        >>> Point3D.are_collinear(p1, p2, p3, p5)
        False
        )r   r«   )r…   s    r,   Úare_collinearzPoint3D.are_collinearj  s   € ôD ×!Ñ! 6Ð*Ð*rM   c                 óú   — | j                  |«      }t        t        d„ |D «       Ž «      }|j                  | j                  z
  |z  |j                  | j                  z
  |z  |j
                  | j
                  z
  |z  gS )ap  
        Gives the direction cosine between 2 points

        Parameters
        ==========

        p : Point3D

        Returns
        =======

        list

        Examples
        ========

        >>> from sympy import Point3D
        >>> p1 = Point3D(1, 2, 3)
        >>> p1.direction_cosine(Point3D(2, 3, 5))
        [sqrt(6)/6, sqrt(6)/6, sqrt(6)/3]
        c              3   ó&   K  — | ]	  }|d z  –— Œ y­wr–   rx   r   s     r,   r-   z+Point3D.direction_cosine.<locals>.<genexpr>¥  s   è ø€ Ò' �q˜!•tÑ'ùs   ‚)Údirection_ratior   r   r_   rä   Úz)rJ   Úpointr+   rU   s       r,   Údirection_cosinezPoint3D.direction_cosineŽ  sq   € ð, × Ñ  Ó'ˆÜ”Ñ' QÔ'Ð(Ó)ˆØ—‘˜4Ÿ6™6Ñ! QÑ&¨¯©°$·&±&Ñ(8¸AÑ'=Ø—‘˜4Ÿ6™6Ñ! QÑ&ð(ð 	(rM   c                 ó–   — |j                   | j                   z
  |j                  | j                  z
  |j                  | j                  z
  gS )aV  
        Gives the direction ratio between 2 points

        Parameters
        ==========

        p : Point3D

        Returns
        =======

        list

        Examples
        ========

        >>> from sympy import Point3D
        >>> p1 = Point3D(1, 2, 3)
        >>> p1.direction_ratio(Point3D(2, 3, 5))
        [1, 1, 2]
        )r_   rä   r  )rJ   r  s     r,   r  zPoint3D.direction_ratio©  s8   € ð, —‘˜4Ÿ6™6Ñ! E§G¡G¨d¯f©fÑ$4°u·w±wÀÇÁÑ7GÐIÐIrM   c                 ó’   — t        |t        «      st        |d¬«      }t        |t        «      r
| |k(  r| gS g S |j	                  | «      S )a�  The intersection between this point and another GeometryEntity.

        Parameters
        ==========

        other : GeometryEntity or sequence of coordinates

        Returns
        =======

        intersection : list of Points

        Notes
        =====

        The return value will either be an empty list if there is no
        intersection, otherwise it will contain this point.

        Examples
        ========

        >>> from sympy import Point3D
        >>> p1, p2, p3 = Point3D(0, 0, 0), Point3D(1, 1, 1), Point3D(0, 0, 0)
        >>> p1.intersection(p2)
        []
        >>> p1.intersection(p3)
        [Point3D(0, 0, 0)]

        r3   r”   )r0   r   r   r@   r§   rc   s     r,   r§   zPoint3D.intersectionÁ  sH   € ô< ˜%¤Ô0Ü˜% QÔ'ˆEÜ�eœWÔ%Ø�uŠ}Ø�v�ØˆIØ×!Ñ! $Ó'Ð'rM   Nc                 ó  — |rMt        |«      }  | j                  | j                  Ž j                  |||«      j                  |j                  Ž S t        | j                  |z  | j
                  |z  | j                  |z  «      S )aö  Scale the coordinates of the Point by multiplying by
        ``x`` and ``y`` after subtracting ``pt`` -- default is (0, 0) --
        and then adding ``pt`` back again (i.e. ``pt`` is the point of
        reference for the scaling).

        See Also
        ========

        translate

        Examples
        ========

        >>> from sympy import Point3D
        >>> t = Point3D(1, 1, 1)
        >>> t.scale(2)
        Point3D(2, 1, 1)
        >>> t.scale(2, 2)
        Point3D(2, 2, 1)

        )r@   rì   rC   rí   r_   rä   r  )rJ   r_   rä   r  rè   s        r,   rí   zPoint3D.scaleç  sn   € ñ, Ü˜“ˆBØG�>�4—>‘> R C§:¡:Ð.×4Ñ4°Q¸¸1Ó=×GÑGÈÏÉÐQÐQÜ�t—v‘v˜a‘x §¡¨¡¨4¯6©6°!©8Ó4Ð4rM   c           
      óà   — |j                   r|j                  dk(  st        d«      ‚| j                  \  }}}t	        |«      }t        t        dd|||dg«      |z  j                  «       d   dd Ž S )zéReturn the point after applying the transformation described
        by the 4x4 Matrix, ``matrix``.

        See Also
        ========
        sympy.geometry.point.Point3D.scale
        sympy.geometry.point.Point3D.translate
        )é   r
  zmatrix must be a 4x4 matrixr   r
  r   Nr3   )rï   rð   r9   rC   r   r@   r   rñ   )rJ   rò   r_   rä   r  rŽ   s         r,   ró   zPoint3D.transform  ss   € ð × Ò  V§\¡\°VÒ%;ÜÐ:Ó;Ð;Ø—)‘)‰ˆˆ1ˆaÜ�fÓˆÜœ  1 q¨!¨Q° lÓ3°AÑ5×=Ñ=Ó?ÀÑBÀ2ÀAÐFÐGÐGrM   c                 ój   — t        | j                  |z   | j                  |z   | j                  |z   «      S )aŽ  Shift the Point by adding x and y to the coordinates of the Point.

        See Also
        ========

        scale

        Examples
        ========

        >>> from sympy import Point3D
        >>> t = Point3D(0, 1, 1)
        >>> t.translate(2)
        Point3D(2, 1, 1)
        >>> t.translate(2, 2)
        Point3D(2, 3, 1)
        >>> t + Point3D(2, 2, 2)
        Point3D(2, 3, 3)

        )r@   r_   rä   r  )rJ   r_   rä   r  s       r,   rì   zPoint3D.translate  s+   € ô* �t—v‘v ‘z 4§6¡6¨A¡:¨t¯v©v¸©zÓ:Ð:rM   c                 ó   — | j                   S )zÔ
        Returns the three coordinates of the Point.

        Examples
        ========

        >>> from sympy import Point3D
        >>> p = Point3D(0, 1, 2)
        >>> p.coordinates
        (0, 1, 2)
        rX   rj   s    r,   rö   zPoint3D.coordinates(  r÷   rM   c                 ó    — | j                   d   S )z½
        Returns the X coordinate of the Point.

        Examples
        ========

        >>> from sympy import Point3D
        >>> p = Point3D(0, 1, 3)
        >>> p.x
        0
        r   rX   rj   s    r,   r_   z	Point3D.x7  rù   rM   c                 ó    — | j                   d   S )z½
        Returns the Y coordinate of the Point.

        Examples
        ========

        >>> from sympy import Point3D
        >>> p = Point3D(0, 1, 2)
        >>> p.y
        1
        r   rX   rj   s    r,   rä   z	Point3D.yF  rù   rM   c                 ó    — | j                   d   S )z½
        Returns the Z coordinate of the Point.

        Examples
        ========

        >>> from sympy import Point3D
        >>> p = Point3D(0, 1, 1)
        >>> p.z
        1
        r"   rX   rj   s    r,   r  z	Point3D.zU  rù   rM   )r   r   r   N)r   r   r   )rÓ   rÔ   rÕ   rÖ   r{   rA   r[   rÙ   rÿ   r  r  r§   rí   ró   rì   rÚ   rö   r_   rä   r  rx   rM   r,   r@   r@   1  s£   „ ñ+ðZ Ðà%*ô 2òð ñ!+ó ð!+òF(ò6Jò0$(óL5ò6Hó;ð. ñó ðð ñó ðð ñó ðð ñó ñrM   r@   ),rÖ   r:   Ú
sympy.corer   r   r   Úsympy.core.addr   Úsympy.core.containersr   Úsympy.core.numbersr   Úsympy.core.parametersr	   Úsympy.simplify.simplifyr
   r   Úsympy.geometry.exceptionsr   Ú(sympy.functions.elementary.miscellaneousr   Ú$sympy.functions.elementary.complexesr   Ú(sympy.functions.elementary.trigonometricr   r   Úsympy.matricesr   Úsympy.matrices.expressionsr   Úsympy.utilities.iterablesr   r   Úsympy.utilities.miscr   r   r   Úentityr   Úmpmath.libmp.libmpfr   r   r?   r@   rx   rM   r,   ú<module>r      sq   ðñó& ç 'Ñ 'Ý Ý 'Ý $Ý 3ß 7Ý 3Ý 9Ý 3ß =Ý !Ý 0ß 7ß CÑ Cå "å +ôo ˆNô o ôdSˆeô Sôjqˆeõ qrM   