+
    i5                     0   R t ^ RIt^ RIHtHtHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHtH t  ^ RI!H"t"H#t#H$t$ ^RI%H&t& ^ RI'H(t(  ! R R]&4      t) ! R R])4      t* ! R R])4      t+R# )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                   r  a  ] tR t^*t o RtRtR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR t]R 4       t]R 4       t]R 4       t]R 4       tR tR tR tR)R ltR tR t R t!]R 4       t"R t#]R 4       t$]R 4       t%R  t&]R! 4       t']R" 4       t(]R# 4       t)R$ t*R% t+]R& 4       t,R't-V t.R(# )*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                   VP                  R \        P                  4      pVP                  RR4      p\        V4      ^8X  d
   V^ ,          MTp\	        V\
        4      '       d.   Rp\        V4      VP                  R\        V4      4      8X  d   V# \        V4      '       g-   \        \        RP                  \        V4      4      4      4      h\        V4      ^ 8X  d@   VP                  RR4      '       d(   \        P                  3VP                  R4      ,          p\        V!  pVP                  R\        V4      4      p\        V4      ^8  d   \        \        R4      4      h\        V4      V8w  dk   RP                  V\        V4      V4      pVR8X  d   MFVR	8X  d   \        V4      hVR
8X  d   \        P                   ! V^R7       M\        \        R4      4      h\#        WVR 4      '       d   \        R4      h\"        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R4      h\$        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   \        R4      hVRV \        P                  3V\        V4      ,
          ,          ,           pV'       dJ   TP'                  VP)                  \*        4       Uu/ uF  pV\-        \/        VRR7      4      bK  	  up4      p\        V4      ^8X  d   RVR&   \1        V/ VB # \        V4      ^8X  d   RVR&   \3        V/ VB # \4        P6                  ! V .VO5!  # u upi )evaluateon_morphignoreFdimz<
                Expecting sequence of coordinates, not `{}`Nz[
                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   v   "   T F/  qP                   ;'       d    \        V4      P                  R J x  K1  	  R# 5i)FN)	is_numberr   is_zero.0as   & t/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/sympy/geometry/point.py	<genexpr> Point.__new__.<locals>.<genexpr>   s*     Fv!{{55r!u}}55vs   9 9Tz(Imaginary coordinates are not permitted.c              3   B   "   T F  p\        V\        4      x  K  	  R # 5iN)
isinstancer   r&   s   & r)   r*   r+      s     71:a&&s   z,Coordinates must be valid SymPy expressions.)rational_nocheck)getr   r   lenr.   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)   r>   Point.__new__m   s   ::j*;*D*DE::j(3  INa fe$$ H6{fjjF<<6""J (?(.y/@(AC D D
 v;!

5$ 7 7ffYvzz%00FjjF,v;?Z )& ' ( ( v;#()/FS)I 8#W$ ))V#g!4  -/ "0 1 1 vd|EFF3FvF333FvFFFGHHs77sss7777JKK 	3V+< == __ ,,u-&/-Q 8Ia$788-&/ 0F
 v;!!%F:F-f--[A!%F:F-f-- %%c3F33&/s   # M"c                d    \        ^ .\        V 4      ,          4      p\         P                  W4      # )z7Returns the distance between this point and the origin.)r   r2   distance)selforigins   & r)   __abs__Point.__abs__   s%    s3t9}%~~f++    c                    \         P                  V \        VRR7      4      w  r#\        Y#4       UUu. uF  w  rE\        YE,           4      NK  	  ppp\        TRR7      #   \         d    \        RP	                  T4      4      hi ; iu uppi )a  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_dimensionr3   r   r4   zipr
   )rH   othersor(   brB   s   &&     r)   __add__Point.__add__   s    >	]--dE%%4PQDA /2!i8ida(15/i8Ve,,	  	] M T TUZ [\\	] 9s   #A B&Bc                    WP                   9   # r-   r@   rH   items   &&r)   __contains__Point.__contains__   s    yy  rL   c                    \        V4      pV P                   Uu. uF  p\        W!,          4      NK  	  pp\        VRR7      # u upi )z'Divide point's coordinates by a factor.FrN   r   r@   r
   r   )rH   divisorxrB   s   &&  r)   __truediv__Point.__truediv__   s=    '"/3yy9y!(19%y9Ve,, :   Ac                    \        V\        4      '       d.   \        V P                  4      \        VP                  4      8w  d   R # V P                  VP                  8H  # )F)r.   r   r2   r@   rH   rQ   s   &&r)   __eq__Point.__eq__   s<    %''3tyy>S_+LyyEJJ&&rL   c                (    V P                   V,          # r-   rX   )rH   keys   &&r)   __getitem__Point.__getitem__   s    yy~rL   c                ,    \        V P                  4      # r-   )hashr@   rH   s   &r)   __hash__Point.__hash__   s    DIIrL   c                6    V P                   P                  4       # r-   )r@   __iter__rn   s   &r)   rr   Point.__iter__   s    yy!!##rL   c                ,    \        V P                  4      # r-   )r2   r@   rn   s   &r)   __len__Point.__len__   s    499~rL   c                    \        V4      pV P                   Uu. uF  p\        W!,          4      NK  	  pp\        VRR7      # u upi )a  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
FrN   r^   )rH   factorr`   rB   s   &&  r)   __mul__Point.__mul__   s>    6 .2ii8i(18$i8Ve,, 9rc   c                $    V P                  V4      # )z)Multiply a factor by point's coordinates.)ry   )rH   rx   s   &&r)   __rmul__Point.__rmul__  s    ||F##rL   c                \    V P                    Uu. uF  q) NK  	  pp\        VRR7      # u upi )zNegate the point.FrN   )r@   r   )rH   r`   rB   s   &  r)   __neg__Point.__neg__  s,    "ii(i"i(Ve,, )s   )c                <    Y Uu. uF  q") NK  	  up,           # u upi )zHSubtract two points, or subtract a factor from this point's
coordinates. )rH   rQ   r`   s   && r)   __sub__Point.__sub__#  s!     5)5ar5))))s   c                z  a \        V RR4      oVP                  RS4      oSf   \        R V 4       4      o\        ;QJ d    V3R lV 4       F  '       d   K   RM	  RM! V3R lV 4       4      '       d   \	        V4      # SVR&   VP                  RR	4      VR&   V Uu. uF  p\        V3/ VB NK  	  up# u upi )
znEnsure that points have the same dimension.
By default `on_morph='warn'` is passed to the
`Point` constructor._ambient_dimensionNr   c              3   8   "   T F  qP                   x  K  	  R # 5ir-   ambient_dimensionr'   is   & r)   r*   -Point._normalize_dimension.<locals>.<genexpr>3  s     :6a))6s   c              3   @   <"   T F  qP                   S8H  x  K  	  R # 5ir-   r   )r'   r   r   s   & r)   r*   r   4  s     :6a""c)6s   FTr   r!   )getattrr1   maxr9   listr   )r?   pointsrA   r   r   s   &*, @r)   rO   Point._normalize_dimension(  s     c/6jj$;:6::C3:6:333:6:::<u#ZZ
F;z,23Fqa"6"F333s    B8c                 Z   \        V 4      ^ 8X  d   R# \        P                  ! V  Uu. uF  p\        V4      NK  	  up!  pV^ ,          pVR,           Uu. uF  qV,
          NK  	  pp\        V Uu. uF  qP                  NK  	  up4      pVP                  R R7      # u upi u upi u upi )a?  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.:   NNc                 x    V P                   '       d   \        V P                  ^4      4      R8  # V P                  # )   g-q=)r$   absnr%   )r`   s   &r)   <lambda>#Point.affine_rank.<locals>.<lambda>M  s*    #$;;;CAK%=AII=rL   )
iszerofunc)r2   r   rO   r   r@   rank)r@   r   r   rI   ms   *    r)   affine_rankPoint.affine_rank:  s     t9>I ++-E1eAh-EF&,Rj1jf**j1F+FqFFF+,vv $>v ? 	? .F1+s   BB#0B(c                .    \        V R\        V 4      4      # )z$Number of components this point has.r   )r   r2   rn   s   &r)   r   Point.ambient_dimensionP  s     t13t9==rL   c                   \        V4      ^8:  d   R# V P                  ! V Uu. uF  p\        V4      NK  	  up!  pV^ ,          P                  ^8X  d   R# \	        \        V4      4      p\        P                  ! V!  ^8*  # u upi )a1  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

T)r2   rO   r   r   r   r   r   )r?   r   r   s   &* r)   are_coplanarPoint.are_coplanarU  sv    H v;!))f+EfE!Hf+EF!9&&!+d6l#  &)Q.. ,Fs   Bc           	        \        V\        4      '       g    \        WP                  R7      p\        V\        4      '       dD   \        P                  V \        V4      4      w  r#\        \        R \        W#4       4       !  4      # \        VRR4      pVf   \	        R\        V4      ,          4      hV! V 4      #   \         d    \	        R\        T4      ,          4      hi ; i)a  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   D   "   T F  w  rW,
          ^,          x  K  	  R# 5ir   Nr   r'   r(   rT   s   &  r)   r*   !Point.distance.<locals>.<genexpr>  s     ?YTQquqjjYs    rG   Nz,distance between Point and %s is not defined)r.   r   r   r   r3   typerO   r   r   rP   r   )rH   rQ   rR   prG   s   &&   r)   rG   Point.distance  s    N %00Ye)?)?@ eU##--dE%LADA?SY?@AA5*d3JTRW[XYY~  Y IDQVK WXXYs   B; ;'C"c                l    \        V4      '       g   \        V4      p\        R \        W4       4       !  # )z.Return dot product of self with another Point.c              3   6   "   T F  w  rW,          x  K  	  R # 5ir-   r   r   s   &  r)   r*   Point.dot.<locals>.<genexpr>  s     2\TQQSS\s   )r   r   r   rP   )rH   r   s   &&r)   dot	Point.dot  s)    1~~aA2S\233rL   c                    \        V\        4      '       d   \        V 4      \        V4      8w  d   R# \        ;QJ d%    R \	        W4       4       F  '       d   K   R# 	  R# ! R \	        W4       4       4      # )z8Returns whether the coordinates of self and other agree.Fc              3   H   "   T F  w  rVP                  V4      x  K  	  R # 5ir-   )equalsr   s   &  r)   r*   Point.equals.<locals>.<genexpr>  s     <+;41188A;;+;    "T)r.   r   r2   r9   rP   re   s   &&r)   r   Point.equals  sV     %''3t9E
+Bs<3t+;<ss<s<s<3t+;<<<rL   c                    \        V4      pV P                   Uu. uF  qDP                  ! RRV/VB NK  	  pp\        VRR/ # u upi )a  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   Fr   )r   r@   evalfr   )rH   precoptionsdpsr`   rB   s   &&,   r)   _eval_evalfPoint._eval_evalf  sK    8 $59YY?Y''+C+7+Y?f-u-- @s   Ac                    \        V\        4      '       g   \        V4      p\        V\        4      '       d2   W8X  d   V .# \        P                  W4      w  r#W 8X  d
   W#8X  d   V .# . # VP	                  V 4      # )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)]

)r.   r   r   rO   intersection)rH   rQ   p1p2s   &&  r)   r   Point.intersection  sk    < %00%LEeU##}v//<FBzbhvI!!$''rL   c                    V 3V,           p\         P                  ! V Uu. uF  p\        V4      NK  	  up!  p\        \        V4      4      p\         P                  ! V!  ^8*  # u upi )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   rO   r   r   r   )rH   r@   r   r   s   &*  r)   is_collinearPoint.is_collinear  s]    B 4++-G1eAh-GHd6l#  &)Q.. .Hs   A#c           	        V 3V,           p\         P                  ! V Uu. uF  p\        V4      NK  	  up!  p\        \        V4      4      p\         P                  ! V!  ^8:  g   R# V^ ,          pV Uu. uF  qUV,
          NK  	  pp\        V Uu. uF%  p\        V4      VP                  V4      .,           NK'  	  up4      pVP                  4       w  rx\        V4      V9  d   R# R# u upi u upi u upi )ag  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

FT)	r   rO   r   r   r   r   r   rrefr2   )	rH   r@   r   r   rI   r   matr   pivotss	   &*       r)   is_concyclicPoint.is_concyclic3  s    L 4++-G1eAh-GHd6l#  &)Q.&,-ff**f- F;Fqd1gq
**F;<xxzv;f$ .H
 . <s   C(4C-+C2c                4    V P                   pVf   R# V'       * # )zjTrue if any coordinate is nonzero, False if every coordinate is zero,
and None if it cannot be determined.N)r%   )rH   r%   s   & r)   
is_nonzeroPoint.is_nonzerok  s     ,,?{rL   c                   \         P                  V \        V4      4      w  r#VP                  ^8X  db   VP                  VP                  uw  rEw  rgWG,          We,          ,
          P	                  ^ 4      pVf   \        \        RV: RV: 24      4      h\        VP                  VP                  .4      p	V	P                  4       ^8  # )zkReturns whether each coordinate of `self` is a scalar
multiple of the corresponding coordinate in point p.
zCannot determine if z- is a scalar multiple of
                    )	r   rO   r   r@   r   r   r   r   r   )
rH   r   rR   rS   x1y1x2y2rvr   s
   &&        r)   is_scalar_multiplePoint.is_scalar_multiplet  s     ))$a9!#!"HRhr%"%-''*Bz!*##$ % % AFFAFF#$vvx!|rL   c                    V P                    Uu. uF  qP                  NK  	  pp\        V4      '       d   R# \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   R# R# u upi )zkTrue if every coordinate is zero, False if any coordinate is not zero,
and None if it cannot be determined.Fc              3   (   "   T F  qR J x  K
  	  R # 5ir-   r   )r'   r`   s   & r)   r*    Point.is_zero.<locals>.<genexpr>  s     *'QDy's   TN)r@   r   r8   )rH   r`   nonzeros   &  r)   r%   Point.is_zero  sV     *.3A<<3w<<3*'*333*'*** 4s   A6c                "    \         P                  # )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   r5   rn   s   &r)   lengthPoint.length  s     vvrL   c           
         \         P                  V \        V4      4      w  r!\        \        W!4       UUu. uF+  w  r4\        W4,           \        P
                  ,          4      NK-  	  upp4      # u uppi )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   rO   rP   r
   r   Half)rH   r   rR   r(   rT   s   &&   r)   midpointPoint.midpoint  sN    6 ))$a93q9E941hqvv~.9EFFEs   1A.
c                >    \        ^ .\        V 4      ,          RR7      # )zGA point of all zeros of the same ambient dimension
as the current pointFrN   )r   r2   rn   s   &r)   rI   Point.origin  s     aST]U33rL   c                l   V P                   pV ^ ,          P                  '       d#   \        ^.V^,
          ^ .,          ,           4      # V ^,          P                  '       d$   \        ^ ^.V^,
          ^ .,          ,           4      # \        V ^,          ) V ^ ,          .V^,
          ^ .,          ,           4      # )a  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   )rH   r   s   & r)   orthogonal_directionPoint.orthogonal_direction  s      $$7???!a!},--7???!A#'A3.// tAwhQ(C!GaS=899rL   c                    \         P                  \        V 4      \        V4      4      w  rVP                  '       d   \        R4      hWP	                  V4      VP	                  V4      ,          ,          # )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   rO   r%   r6   r   )r(   rT   s   &&r)   projectPoint.project  sT    D ))%(E!H=999ABB%%(QUU1X%&&rL   c                v    \         P                  V \        V4      4      w  r!\        R \        W!4       4       !  # )a  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   H   "   T F  w  r\        W,
          4      x  K  	  R # 5ir-   r   r   s   &  r)   r*   )Point.taxicab_distance.<locals>.<genexpr>%  s     6IDASZZIr   )r   rO   r   rP   rH   r   rR   s   && r)   taxicab_distancePoint.taxicab_distance  s1    < ))$a96CI677rL   c                    \         P                  V \        V4      4      w  r!V P                  '       d   VP                  '       d   \        R4      h\	        R \        W!4       4       !  # )am  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      "   T F8  w  r\        W,
          4      \        V4      \        V4      ,           ,          x  K:  	  R # 5ir-   r   r   s   &  r)   r*   *Point.canberra_distance.<locals>.<genexpr>S  s,     J	c!%j#a&3q6/22	s   A A)r   rO   r%   r6   r   rP   r   s   && r)   canberra_distancePoint.canberra_distance'  sO    R ))$a9<<<AIIIABBJA	JKKrL   c                &    V \        V 4      ,          # )z\Return the Point that is in the same direction as `self`
and a distance of 1 from the originr   rn   s   &r)   unit
Point.unitU  s     c$irL   r   N)   )/__name__
__module____qualname____firstlineno____doc__is_Pointr>   rJ   rU   r[   ra   rf   rj   ro   rr   ru   ry   r|   r   r   classmethodrO   staticmethodr   propertyr   r   rG   r   r   r   r   r   r   r   r   r%   r   r   rI   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r)   r   r   *   sy    >@ HF4P,
%-N!-'
$->$-
*
 4 4" ? ?* > > +/ +/Z2h4=.@'(R$/L6p  &    G< 4 4
 : :2 $' $'L8B,L\    rL   r   c                      a  ] tR tRt o Rt^tRR/R ltR t]R 4       t	RR	 lt
RR
 ltR tRR lt]R 4       t]R 4       t]R 4       tRtV tR# )r<   i\  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)

r0   Fc               b    V'       g   ^VR&   \        V/ VB p\        P                  ! V .VO5!  # )r   r   r   r   r>   r?   r0   r@   rA   s   &$*,r)   r>   Point2D.__new__  3    F5M$)&)D%%c1D11rL   c                
    W8H  # r-   r   rY   s   &&r)   r[   Point2D.__contains__  
    |rL   c                ^    V P                   V P                  V P                   V P                  3# )zgReturn a tuple (xmin, ymin, xmax, ymax) representing the bounding
rectangle for the geometric figure.

)r`   yrn   s   &r)   boundsPoint2D.bounds  s#     //rL   Nc                    \        V4      p\        V4      pT pVe   \        V^R7      pWR,          pVP                  w  rg\        W6,          WG,          ,
          WF,          W7,          ,           4      pVe	   WR,          pV# )zRotate ``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@   )rH   angleptcrR   r   r`   r  s   &&&     r)   rotatePoint2D.rotate  sk    & JJ>rq!BHBww139acACi(>HB	rL   c                   V'       dP   \        V^R7      pV P                  ! V) P                  !  P                  W4      P                  ! VP                  !  # \        V P                  V,          V P
                  V,          4      # )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   	translater@   scaler`   r  )rH   r`   r  r  s   &&&&r)   r!  Point2D.scale  s_    , rq!B>>RC::.44Q:DDbggNNTVVAXtvvax((rL   c           	         VP                   '       d   VP                  R8X  g   \        R4      hV P                  w  r#\	        \        ^^W#^.4      V,          P                  4       ^ ,          R,          !  # )zReturn 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
zmatrix must be a 3x3 matrix:Nr   N)   r$  )	is_Matrixshaper6   r@   r   r   tolist)rH   matrixr`   r  s   &&  r)   	transformPoint2D.transform  sb        V\\V%;:;;yyvaQ1I.v5==?B2FGGrL   c                ^    \        V P                  V,           V P                  V,           4      # )a4  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  )rH   r`   r  s   &&&r)   r   Point2D.translate  s!    * TVVaZ!,,rL   c                    V P                   # )z
Returns the two coordinates of the Point.

Examples
========

>>> from sympy import Point2D
>>> p = Point2D(0, 1)
>>> p.coordinates
(0, 1)
rX   rn   s   &r)   coordinatesPoint2D.coordinates       yyrL   c                (    V P                   ^ ,          # )zz
Returns the X coordinate of the Point.

Examples
========

>>> from sympy import Point2D
>>> p = Point2D(0, 1)
>>> p.x
0
rX   rn   s   &r)   r`   	Point2D.x       yy|rL   c                (    V P                   ^,          # )zz
Returns the Y coordinate of the Point.

Examples
========

>>> from sympy import Point2D
>>> p = Point2D(0, 1)
>>> p.y
1
rX   rn   s   &r)   r  	Point2D.y"  r3  rL   r   r-   )r   r   N)    r6  )r   r   r  r  r  r   r>   r[   r  r  r  r!  r)  r   r.  r`   r  r  r	  r
  s   @r)   r<   r<   \  s     0d 2U 2 0 0@)6H-.      rL   r<   c                      a  ] tR tRt o Rt^tRR/R ltR t]R 4       t	R t
R	 tR
 tRR ltR tRR lt]R 4       t]R 4       t]R 4       t]R 4       tRtV tR# )r=   i1  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)

r0   Fc               b    V'       g   ^VR&   \        V/ VB p\        P                  ! V .VO5!  # )r$  r   r  r  s   &$*,r)   r>   Point3D.__new__a  r  rL   c                
    W8H  # r-   r   rY   s   &&r)   r[   Point3D.__contains__g  r  rL   c                 *    \         P                  ! V !  # )aK  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_collinearPoint3D.are_collinearj  s    D !!6**rL   c                ,   V P                  V4      p\        \        R V 4       !  4      pVP                  V P                  ,
          V,          VP                  V P                  ,
          V,          VP
                  V P
                  ,
          V,          .# )a   
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   2   "   T F  q^,          x  K  	  R# 5ir   r   r   s   & r)   r*   +Point3D.direction_cosine.<locals>.<genexpr>  s     'Q!ttQs   )direction_ratior   r   r`   r  z)rH   pointr(   rT   s   &&  r)   direction_cosinePoint3D.direction_cosine  sq    ,   ''Q'()466!Q&$&&(8A'=466!Q&( 	(rL   c                    VP                   V P                   ,
          VP                  V P                  ,
          VP                  V P                  ,
          .# )z
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  rC  )rH   rD  s   &&r)   rB  Point3D.direction_ratio  s8    , 466!EGGdff$4uww7GIIrL   c                    \        V\        4      '       g   \        V^R7      p\        V\        4      '       d   W8X  d   V .# . # VP	                  V 4      # )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)]

r   )r.   r   r   r=   r   re   s   &&r)   r   Point3D.intersection  sL    < %00%Q'EeW%%}vI!!$''rL   Nc                .   V'       dO   \        V4      pV P                  ! V) P                  !  P                  WV4      P                  ! VP                  !  # \        V P                  V,          V P
                  V,          V P                  V,          4      # )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   r@   r!  r`   r  rC  )rH   r`   r  rC  r  s   &&&&&r)   r!  Point3D.scale  sh    , B>>RC::.44Q1=GGQQtvvax466!844rL   c           
        VP                   '       d   VP                  R8X  g   \        R4      hV P                  w  r#p\	        V4      p\        \        ^^W#V^.4      V,          P                  4       ^ ,          R,          !  # )zReturn the point after applying the transformation described
by the 4x4 Matrix, ``matrix``.

See Also
========
sympy.geometry.point.Point3D.scale
sympy.geometry.point.Point3D.translate
zmatrix must be a 4x4 matrix:Nr$  N)   rN  )r%  r&  r6   r@   r   r=   r   r'  )rH   r(  r`   r  rC  r   s   &&    r)   r)  Point3D.transform  sp        V\\V%;:;;))af1qQl3A5==?B2FGGrL   c                    \        V P                  V,           V P                  V,           V P                  V,           4      # )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  rC  )rH   r`   r  rC  s   &&&&r)   r   Point3D.translate  s+    * tvvz466A:tvvz::rL   c                    V P                   # )z
Returns the three coordinates of the Point.

Examples
========

>>> from sympy import Point3D
>>> p = Point3D(0, 1, 2)
>>> p.coordinates
(0, 1, 2)
rX   rn   s   &r)   r.  Point3D.coordinates(  r0  rL   c                (    V P                   ^ ,          # )z}
Returns the X coordinate of the Point.

Examples
========

>>> from sympy import Point3D
>>> p = Point3D(0, 1, 3)
>>> p.x
0
rX   rn   s   &r)   r`   	Point3D.x7  r3  rL   c                (    V P                   ^,          # )z}
Returns the Y coordinate of the Point.

Examples
========

>>> from sympy import Point3D
>>> p = Point3D(0, 1, 2)
>>> p.y
1
rX   rn   s   &r)   r  	Point3D.yF  r3  rL   c                (    V P                   ^,          # )z}
Returns the Z coordinate of the Point.

Examples
========

>>> from sympy import Point3D
>>> p = Point3D(0, 1, 1)
>>> p.z
1
rX   rn   s   &r)   rC  	Point3D.zU  r3  rL   r   )r   r   r   N)r6  r6  r6  )r   r   r  r  r  r   r>   r[   r  r=  rE  rB  r   r!  r)  r   r  r.  r`   r  rC  r  r	  r
  s   @r)   r=   r=   1  s     +Z 2U 2 !+ !+F(6J0$(L56H;.        rL   r=   ),r  r7   
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=   r   rL   r)   <module>rj     sq   &  ' '  ' $ 3 7 3 9 3 = ! 0 7 C C " +o N o dSe Sjqe qrL   