Ë
    7^(hˆ  ã                   ób   — 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	 d dl
mZ  G d„ de«      Zy	)
é    )ÚBasic)ÚStr)ÚVector)Ú
CoordSys3D)Ú_path)Úcacheitc                   ó^   ‡ — e Zd ZdZej
                  dfˆ fd„	Zed„ «       Zd„ Z	d„ Z
d„ Zˆ xZS )ÚPointz*
    Represents a point in 3-D space.
    Nc                 óž  •— t        |«      }t        |t        «      st        dt	        |«      z  «      ‚t        |t
        «      s|�t        dt	        |«      z  «      ‚|€t        ‰| �  | t        |«      |«      }nt        ‰| �  | t        |«      ||«      }||_	        ||_
        |€d |_        ||_        |S ||_        |j                  |_        |S )Nz0position should be an instance of Vector, not %sz3parent_point should be an instance of Point, not %s)ÚstrÚ
isinstancer   Ú	TypeErrorÚtyper
   ÚsuperÚ__new__r   Ú_nameÚ_posÚ_parentÚ_root)ÚclsÚnameÚpositionÚparent_pointÚobjÚ	__class__s        €úP/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/vector/point.pyr   zPoint.__new__   sâ   ø€ Ü�4‹yˆä˜(¤FÔ+ÜØBÄTØóFñ óð ô ˜<¬Ô/ØÐ(ÜØEÌØ óI"ñ "ó#ð #ð ÐÜ‘'‘/ #¤s¨4£y°(Ó;‰Cä‘'‘/ #¤s¨4£y°(¸LÓIˆCàˆŒ	ØˆŒØÐØˆCŒKØˆCŒIð
 ˆ
ð 'ˆCŒKØ$×*Ñ*ˆCŒIàˆ
ó    c                 ó(  — t        |t        «      s't        |t        «      st        t	        |«      dz   «      ‚t        |t        «      r|j
                  }|| k(  rt        j                  S || j                  k(  r| j                  S |j                  | k(  rd|j                  z  S t        | |«      \  }}t        j                  }t        |«      D ]  }|||   j                  z  }Œ t        |dz   t        |«      «      D ]  }|||   j                  z  }Œ |S )aL  
        Returns the position vector of this Point with respect to
        another Point/CoordSys3D.

        Parameters
        ==========

        other : Point/CoordSys3D
            If other is a Point, the position of this Point wrt it is
            returned. If its an instance of CoordSyRect, the position
            wrt its origin is returned.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> N = CoordSys3D('N')
        >>> p1 = N.origin.locate_new('p1', 10 * N.i)
        >>> N.origin.position_wrt(p1)
        (-10)*N.i

        zis not a Point or CoordSys3Déÿÿÿÿé   )r   r
   r   r   r   Úoriginr   Úzeror   r   r   ÚrangeÚlen)ÚselfÚotherÚ	rootindexÚpathÚresultÚis         r   Úposition_wrtzPoint.position_wrt+   sû   € ô2 ˜5¤%Ô(Ü˜u¤jÔ1ÜœC ›JØ:ñ;ó <ð <ä�eœZÔ(Ø—L‘LˆEà�DŠ=Ü—;‘;ÐØ�d—l‘lÒ"Ø—9‘9ÐØ�]‰]˜dÒ"Ø˜Ÿ
™
‘?Ð"ä  eÓ,‰ˆ	�4Ü—‘ˆÜ�yÓ!ò 	#ˆAØ�d˜1‘g—l‘lÑ"‰Fð	#ä�y 1‘}¤c¨$£iÓ0ò 	#ˆAØ�d˜1‘g—l‘lÑ"‰Fð	#àˆr   c                 ó   — t        ||| «      S )ai  
        Returns a new Point located at the given position wrt this
        Point.
        Thus, the position vector of the new Point wrt this one will
        be equal to the given 'position' parameter.

        Parameters
        ==========

        name : str
            Name of the new point

        position : Vector
            The position vector of the new Point wrt this one

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> N = CoordSys3D('N')
        >>> p1 = N.origin.locate_new('p1', 10 * N.i)
        >>> p1.position_wrt(N.origin)
        10*N.i

        )r
   )r%   r   r   s      r   Ú
locate_newzPoint.locate_newZ   s   € ô4 �T˜8 TÓ*Ð*r   c                 ól   — | j                  |j                  «      }t        |j                  |«      «      S )aA  
        Returns the Cartesian/rectangular coordinates of this point
        wrt the origin of the given CoordSys3D instance.

        Parameters
        ==========

        coordinate_system : CoordSys3D
            The coordinate system to express the coordinates of this
            Point in.

        Examples
        ========

        >>> from sympy.vector import CoordSys3D
        >>> N = CoordSys3D('N')
        >>> p1 = N.origin.locate_new('p1', 10 * N.i)
        >>> p2 = p1.locate_new('p2', 5 * N.j)
        >>> p2.express_coordinates(N)
        (10, 5, 0)

        )r+   r!   ÚtupleÚ	to_matrix)r%   Úcoordinate_systemÚpos_vects      r   Úexpress_coordinateszPoint.express_coordinatesv   s2   € ð2 ×$Ñ$Ð%6×%=Ñ%=Ó>ˆä�X×'Ñ'Ð(9Ó:Ó;Ð;r   c                 ó   — | j                   S )N)r   )r%   Úprinters     r   Ú	_sympystrzPoint._sympystr“   s   € Ø�z‰zÐr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r"   r   r   r+   r-   r3   r6   Ú__classcell__)r   s   @r   r
   r
   	   s<   ø„ ñð %+§K¡K¸dõ ð: ñ,ó ð,ò\+ò8<ö:r   r
   N)Úsympy.core.basicr   Úsympy.core.symbolr   Úsympy.vector.vectorr   Úsympy.vector.coordsysrectr   Úsympy.vector.functionsr   Úsympy.core.cacher   r
   © r   r   ú<module>rC      s%   ðÝ "Ý !Ý &Ý 0Ý (Ý $ôKˆEõ Kr   