+
    ‹°³já�  ã                   ó>  € ^ RI Ht ^ RIHt ^ RIH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 ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtH t  ^ RI!H"t" ^ RIHt ^ RI#H$t$ ^ RI%H&t& ^ RI't(^ RI)H*t*H+t+H,t,H-t-H.t.  ! R R]4      t/R t0^ RI1H2t2 R# )é    )ÚCallable)ÚBasic)Úcacheit)ÚSÚDummyÚLambda)ÚStr)Úsymbols)ÚImmutableDenseMatrix)Ú
MatrixBase)Úsolve)Ú
BaseScalar)ÚTuple)Údiff)Úsqrt)ÚacosÚatan2ÚcosÚsin)Úeye©Úsimplify)ÚtrigsimpN)ÚOrienterÚAxisOrienterÚBodyOrienterÚSpaceOrienterÚQuaternionOrienterc                   ó„  a a€ ] tR t^t oRtR!V 3R lltR tR t]R 4       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 tR tR tR tR t]R 4       tR tR"R ltR#R ltR#R lt R#R lt!R#R lt"R#R lt#R"R lt$R$R lt%]P                  ]%n        ]R 4       t&R t'Vt(V ;t)# )%Ú
CoordSys3Dz.
Represents a coordinate system in 3-D space.
c                ó†  <aaa€ \        V4      p\        P                  P                  p\        P                  P                  p	\        V\         4      '       g   \        R4      hSEe"   Vf   Ve   \        R4      h\        S\        \        \        34      '       dL   \        S^ ,          \        4      '       d   S^ ,          pS^,          pM½\        S^ ,          S^,          4      oM¢\        S\        4      '       d+   \        R\        R7      w  r«p\        W«V3S! W«V4      4      oMb\        S\         4      '       d   \!        S4      oM@\        S\         \        34      '       d   M#\        RP#                  \%        S4      4      4      hVf   \'        \)        ^4      4      pM1\        V\        4      '       g   \        R4      hVP+                  4       pVe§   \        V\,        4      '       g   \        R4      hVf   VP.                  pMP\        WH4      '       g   \        R4      hVP0                   F$  p\        V\2        4      '       g   K  \        R4      h	  VP4                  P7                  VR,           V4      pMVP.                  pV	! VR,           4      pSf   \        WT4      o\        S\        4      '       dU   \,        P9                  S^ ,          S^,          V4      pSw  ooSP:                  o\,        P=                  R	4      pVV3R
 lpEM&\        S\         4      '       dž   SP>                  p\,        PA                  V4      pVeN   VPC                  4       \D        PF                  \D        PF                  \D        PF                  38w  d   \        R4      h\,        P=                  V4      p\,        PI                  V4      pMs\        S\        4      '       dA   \,        PK                  S4      '       g   \        R4      hSp\,        PM                  V4      pRpMV3R lp\,        P=                  S4      pRpVfg   \        S\        4      '       d   . ROpMK\        S\         4      '       d2   SP>                  R8X  d   . ROpMSP>                  R8X  d   . ROpM	. ROpM. ROpVf   . ROpVe   \N        SV `¡  V \!        V4      SV4      pM\N        SV `¡  V \!        V4      S4      pVVn)        \U        RV4       \        V4      pV Uu. uF  pRV: RV: R2NK  	  ppV Uu. uF  qÝ: RV: 2NK  	  ppVVn+        \Y        ^ VV^ ,          V^ ,          4      p\Y        ^VV^,          V^,          4      p\Y        ^VV^,          V^,          4      pVVV3Vn-        \U        RV4       \        V4      pV Uu. uF  pRV: RV: R2NK  	  ppV Uu. uF  qÝ: RV: 2NK  	  ppVVn.        VVn+        \3        ^ VV^ ,          V^ ,          4      p
\3        ^VV^,          V^,          4      p\3        ^VV^,          V^,          4      pW«V3Vn/        SVn0        VVn1        V! W«V4      Vn2        VVn3        \i        VV^ ,          V
4       \i        VV^,          V4       \i        VV^,          V4       \i        VV^ ,          V4       \i        VV^,          V4       \i        VV^,          V4       VVn5        VPj                  e   VPj                  Pl                  Vn6        MVVn6        VVn7        VVn8        V# u upi u upi u upi u upi )a½  
The orientation/location parameters are necessary if this system
is being defined at a certain orientation or location wrt another.

Parameters
==========

name : str
    The name of the new CoordSys3D instance.

transformation : Lambda, Tuple, str
    Transformation defined by transformation equations or chosen
    from predefined ones.

location : Vector
    The position vector of the new system's origin wrt the parent
    instance.

rotation_matrix : SymPy ImmutableMatrix
    The rotation matrix of the new coordinate system with respect
    to the parent. In other words, the output of
    new_system.rotation_matrix(parent).

parent : CoordSys3D
    The coordinate system wrt which the orientation/location
    (or both) is being defined.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

zname should be a stringNz?specify either `transformation` or `location`/`rotation_matrix`zx1 x2 x3©Úclsztransformation: wrong type {}zlocation should be a Vectorz.originÚ	cartesianc                 óž   <€ SP                  4       \        V S^ ,          ,
          VS^,          ,
          VS^,          ,
          .4      ,          # ©r   )ÚinvÚMatrix)ÚxÚyÚzÚlÚrs   &&&€€ÚZ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/vector/coordsysrect.pyÚ<lambda>Ú$CoordSys3D.__new__.<locals>.<lambda>�   s9   ø€ ¨Q¯U©U«W´VØ�1�Q•4•˜˜1˜Q�4�  1 Q¥4¥Ð(ó6*ö .*ó    z=Parent for pre-defined coordinate system should be Cartesian.zHThe transformation equation does not create orthogonal coordinate systemc                 ó   <€ S! WV4      # ©N© )r)   r*   r+   Útransformations   &&&€r.   r/   r0       s   ø€ ±NÀ1ÈÔ4Kr1   Ú	sphericalÚcylindricalÚvector_namesz\mathbf{\hat{z}_{z}}Ú_Úvariable_namesz	\mathbf{{z5rotation_matrix should be an ImmutableMatrix instancez"parent should be a CoordSys3D/Nonez'location should not contain BaseScalars)Úx1Úx2Úx3©r-   ÚthetaÚphi)r-   r?   r+   ©r)   r*   r+   )ÚiÚjÚk)9ÚstrÚsympyÚvectorÚVectorÚPointÚ
isinstanceÚ	TypeErrorÚ
ValueErrorr   ÚtupleÚlistr   r   r   r
   r   r	   ÚformatÚtyper   r   Úas_immutabler    ÚzeroÚfree_symbolsr   ÚoriginÚ
locate_newÚ!_compose_rotation_and_translationÚ_projectionsÚ_get_lame_coeffÚnameÚ_get_transformation_lambdasÚlame_coefficientsr   ÚOneÚ_set_inv_trans_equationsÚ_check_orthogonalityÚ_calculate_lame_coeffÚsuperÚ__new__Ú_nameÚ_check_stringsÚ_vector_namesÚ
BaseVectorÚ_base_vectorsÚ_variable_namesÚ_base_scalarsÚ_transformationÚ_transformation_lambdaÚ_lame_coefficientsÚ"_transformation_from_parent_lambdaÚsetattrÚ_parentÚ_rootÚ_parent_rotation_matrixÚ_origin)r#   rY   r5   ÚparentÚlocationÚrotation_matrixr8   r:   rH   rI   r;   r<   r=   r)   rT   Úlambda_transformationÚlambda_lameÚlambda_inverseÚtrnameÚobjÚlatex_vectsÚpretty_vectsÚv1Úv2Úv3Úlatex_scalarsÚpretty_scalarsr,   r-   Ú	__class__s   &&f&&&&&                   @@€r.   ra   ÚCoordSys3D.__new__   s�  û€ ôH �4‹yˆÜ—‘×$Ñ$ˆÜ—‘×"Ñ"ˆä˜$¤×$Ò$ÜÐ5Ó6Ð6àÓ%ØÒ$¨/Ò*EÜ ð "@ó Að Aä˜.¬5´%¼Ð*>×?Ò?Ü˜n¨QÕ/´×<Ò<Ø&4°QÕ&7�OØ-¨aÕ0‘Hä%+¨N¸1Õ,=Ø,:¸1Õ,=ó&?‘Nä˜N¬H×5Ò5Ü$ Z´UÔ;‘
�˜Ü!'¨°¨Ù(6°r¸rÓ(Bó"D‘ä˜N¬C×0Ò0Ü!$ ^Ó!4‘Ü˜N¬S´&¨M×:Ò:Øäð !0ß06±´t¸NÓ7KÓ0LóNð Nð
 Ò"Ü2´3°q³6Ó:‰Oä˜o¬z×:Ò:Üð !2ó 3ð 3à-×:Ñ:Ó<ˆOð ÒÜ˜f¤j×1Ò1Üð !2ó 3ð 3àÒØ!Ÿ;™;‘ä! (×3Ò3Ü#Ð$AÓBÐBð "×.Ô.�AÜ! !¤Z×0Ô0Ü(ð *8ó 9ð 9ñ /ð —]‘]×-Ñ-¨d°YÕ.>Ø.6ó8‰Fð —{‘{ˆHÙ˜4 )Õ+Ó,ˆFàÒ!Ü" ?Ó=ˆNä�n¤e×,Ò,Ü$.×$PÑ$PØ˜qÕ!Ø˜qÕ!Øó%Ð!ð
 "‰DˆAˆqØ—‘ˆAÜ$×4Ñ4°[ÓAˆKõ*ŠNä˜¬×,Ò,Ø#×(Ñ(ˆFÜ$.×$JÑ$JÈ6Ó$RÐ!ØÒ!Ø×+Ñ+Ó-´!·%±%¼¿¹ÄÇÁÐ1FÔFÜ$ð &?ó @ð @ä$×4Ñ4°VÓ<ˆKÜ'×@Ñ@ÀÓH‰NÜ˜¬×/Ò/Ü×2Ñ2°>×BÒBÜ ð "Gó Hð Hà$2Ð!Ü$×:Ñ:Ð;PÓQˆKØ!‰Nä$KÐ!Ü$×4Ñ4°^ÓDˆKØ!ˆNàÒ!Ü˜.¬&×1Ò1Ú!3‘Ü˜N¬C×0Ò0Ø!×&Ñ&¨+Ô5Ú%:‘NØ#×(Ñ(¨MÔ9Ú%8‘Nâ%4‘Nâ!0�ØÒÚ*ˆLð ÒÜ‘'‘/Ø”S˜“Y °ó8‰Cô ‘'‘/Ø”S˜“Y ó0ˆCàˆŒ	ô 	�~ |Ô4Ü˜LÓ)ˆá ,ó.Ù ,™1ó 67»Ó=Ù ,ð 	ð .á5AÓB±\°¢1¢dÓ+±\ˆÐBà(ˆÔä˜˜3 ¨Q¥°¸QµÓ@ˆÜ˜˜3 ¨Q¥°¸QµÓ@ˆÜ˜˜3 ¨Q¥°¸QµÓ@ˆà  R˜LˆÔô 	Ð'¨Ô6Ü˜nÓ-ˆá,ó.Ù,™ó 45³dÓ;Ù,ð 	ð .á7EÓF±~°!¢QªÓ-±~ˆÐFà,ˆÔØ(ˆÔä˜˜3 ¨qÕ 1°=ÀÕ3CÓDˆÜ˜˜3 ¨qÕ 1°=ÀÕ3CÓDˆÜ˜˜3 ¨qÕ 1°=ÀÕ3CÓDˆà R˜LˆÔà,ˆÔØ%:ˆÔ"Ù!,¨R°RÓ!8ˆÔØ1?ˆÔ.ä��^ AÕ&¨Ô+Ü��^ AÕ&¨Ô+Ü��^ AÕ&¨Ô+ä��\ !•_ bÔ)Ü��\ !•_ bÔ)Ü��\ !•_ bÔ)ð ˆŒØ�;‰;Ò"ØŸ™×)Ñ)ˆC�IàˆCŒIà&5ˆÔ#ØˆŒð ˆ
ùòk.ùâBùò.ùâFs   Ô\/Ô!\4Ö4\9×\>c                ó   € V P                   # r3   )rb   )ÚselfÚprinters   &&r.   Ú	_sympystrÚCoordSys3D._sympystrþ   s   € Ø�z‰zÐr1   c                ó4   € \        V P                  4       4      # r3   )ÚiterÚbase_vectors©r„   s   &r.   Ú__iter__ÚCoordSys3D.__iter__  s   € Ü�D×%Ñ%Ó'Ó(Ð(r1   c                ó  € \        R\        R7      w  rpV ! WV4      p \        \        V ^ ,          V4      \        V ^,          V4      \        V ^,          V4      .4      p\        \        V ^ ,          V4      \        V ^,          V4      \        V ^,          V4      .4      p\        \        V ^ ,          V4      \        V ^,          V4      \        V ^,          V4      .4      p\        ;QJ d    R WEV3 4       F  '       g   K   RM	  RM! R WEV3 4       4      '       d   R# \        VP                  V4      4      ^ 8X  dA   \        VP                  V4      4      ^ 8X  d"   \        VP                  V4      4      ^ 8X  d   R# R# )zÚ
Helper method for _connect_to_cartesian. It checks if
set of transformation equations create orthogonal curvilinear
coordinate system

Parameters
==========

equations : Lambda
    Lambda of transformation equations

ú
x1, x2, x3r"   c              3   ó„   "  € T F6  p\        V^ ,          V^,          ,           V^,          ,           4      ^ 8H  x € K8  	  R# 5i)r   Nr   )Ú.0rB   s   & r.   Ú	<genexpr>Ú2CoordSys3D._check_orthogonality.<locals>.<genexpr>  s/   é € ÐG¹,°QŒx˜˜!�˜q �t� a¨¥dÕ*Ó+¨qÖ0»,ùs   ‚>A TF)r
   r   r(   r   Úanyr   Údot)Ú	equationsr;   r<   r=   r|   r}   r~   s   &      r.   r^   ÚCoordSys3D._check_orthogonality  sA  € ô ˜\¬uÔ5‰
ˆ�Ù˜b bÓ)ˆ	Ü”T˜) A�,¨Ó+Ü˜) A�,¨Ó+¬T°)¸Aµ,ÀÓ-CðEó Fˆô ”T˜) A�,¨Ó+Ü˜) A�,¨Ó+¬T°)¸Aµ,ÀÓ-CðEó Fˆô ”T˜) A�,¨Ó+Ü˜) A�,¨Ó+¬T°)¸Aµ,ÀÓ-CðEó Fˆ÷ ‹3ÑG¸2À2¹,ÓG�3�3Š3ÑG¸2À2¹,ÓG×GÒGÙä˜Ÿ™˜r›
Ó# qÔ(¬X°b·f±f¸R³jÓ-AÀQÔ-FÜ˜RŸV™V B›ZÓ(¨AÔ-Ùár1   c                óT   € V R8X  d   R # V R8X  d   R # V R8X  d   R # \        R4      h)z«
Store information about inverse transformation equations for
pre-defined coordinate systems.

Parameters
==========

curv_coord_name : str
    Name of coordinate system

r$   c                 ó
   € WV3# r3   r4   rA   s   &&&r.   r/   Ú5CoordSys3D._set_inv_trans_equations.<locals>.<lambda>5  s   €  A¨!¡9r1   r6   c           	      óî   € \        V ^,          V^,          ,           V^,          ,           4      \        V\        V ^,          V^,          ,           V^,          ,           4      ,          4      \        W4      3# ©é   )r   r   r   rA   s   &&&r.   r/   rš   8  sR   € Ü�Q˜•T˜A˜q�D•[ 1 a¥4Õ'Ó(Ü�Q”t˜A˜q�D 1 a¥4�K¨!¨Q­$Õ.Ó/Õ/Ó0Ü�a“ñ$r1   r7   c                 óZ   € \        V ^,          V^,          ,           4      \        W4      V3# rœ   )r   r   rA   s   &&&r.   r/   rš   >  s%   € Ü�Q˜•T˜A˜q�D•[Ó!Ü�a“Øñ$r1   ú<Wrong set of parameters.Type of coordinate system is defined)rL   ©Úcurv_coord_names   &r.   r]   Ú#CoordSys3D._set_inv_trans_equations'  sO   € ð ˜kÔ)Ù,Ð,à˜kÔ)ñð ð
 ˜mÔ+ñð ô
 ð @ó Að 	Ar1   c                ó^  aaaa€ \        R\        RR7      w  rp\        R\        R7      w  oooV P                  WV4      p\        V^ ,          S,
          V^,          S,
          V^,          S,
          .WV3RR7      ^ ,          oSV,          SV,          SV,          3oVVVV3R lV n        R# )	z}
Helper method for set_coordinate_type. It calculates inverse
transformation equations for given transformations equations.

r�   T)r#   Úrealszx, y, zr"   )Údictc                 ó‚   <a aa€ \         ;QJ d    . VV VVVV3R  lS 4       F  NK  	  5# ! VV VVVV3R  lS 4       4      # )c              3   óv   <"  € T F.  qP                  \        \        SSS3SSS34      4      4      x € K0  	  R # 5ir3   )ÚsubsrN   Úzip)r‘   rB   r)   r;   r<   r=   r*   r+   s   & €€€€€€r.   r’   ÚNCoordSys3D._calculate_inv_trans_equations.<locals>.<lambda>.<locals>.<genexpr>V  s6   øé € Ð$`ÑY_ÐTU§V¡V¬D´°a¸¸A°YÀÀRÈÀÓ1MÓ,N×%OÐ%OÓY_ùs   ƒ69)rM   )r;   r<   r=   Úsolvedr)   r*   r+   s   fff€€€€r.   r/   Ú;CoordSys3D._calculate_inv_trans_equations.<locals>.<lambda>V  s)   û€ Ÿuœu×$`Ñ$`ÑY_Ó$`ŸuÐ`˜u×$`Ñ$`ÑY_Ó$`Ô`r1   N)r
   r   ri   r   rl   )	r„   r;   r<   r=   r–   r«   r)   r*   r+   s	   &    @@@@r.   Ú_calculate_inv_trans_equationsÚ)CoordSys3D._calculate_inv_trans_equationsF  s¥   û€ ô ˜\¬u¸DÔA‰
ˆ�Ü˜)¬Ô/‰ˆˆ1ˆaà×(Ñ(¨°Ó4ˆ	ä˜	 !� qÕ(Ø! !� qÕ(Ø! !� qÕ(ð*à,.°B¨<¸dôDàDEõGˆð ˜•˜V B�Z¨°­Ð3ˆç`ð 	Ö/r1   c                óª   € \        V \        4      '       d*   V R8X  d   R # V R8X  d   R # V R8X  d   R # \        R4      h\        P	                  V 4      # )zœ
Store information about Lame coefficients for pre-defined
coordinate systems.

Parameters
==========

curv_coord_name : str
    Name of coordinate system

r$   c                 ó`   € \         P                  \         P                  \         P                  3# r3   ©r   r\   rA   s   &&&r.   r/   Ú,CoordSys3D._get_lame_coeff.<locals>.<lambda>g  s   € ¬¯©¬q¯u©u´a·e±eÑ'<r1   r6   c                 óF   € \         P                  W \        V4      ,          3# r3   )r   r\   r   r>   s   &&&r.   r/   r²   i  s   € ¬a¯e©e°Q¼#¸e»*½Ñ-Er1   r7   c                 óD   € \         P                  V \         P                  3# r3   r±   ©r-   r?   Úhs   &&&r.   r/   r²   k  s   € ¬A¯E©E°1´a·e±eÑ+<r1   zAWrong set of parameters. Type of coordinate system is not defined)rJ   rE   rL   r    Ú_calculate_lame_coefficientsr    s   &r.   rX   ÚCoordSys3D._get_lame_coeffX  sa   € ô �o¤s×+Ò+Ø +Ô-Ù<Ð<Ø +Ô-ÙEÐEØ -Ô/Ù<Ð<Üð Ió Jð Jä×6Ñ6°ÓGÐGr1   c                ó   a € V 3R l# )zš
It calculates Lame coefficients
for given transformations equations.

Parameters
==========

equations : Lambda
    Lambda of transformation equations.

c                 óÆ  <€ \        \        S! WV4      ^ ,          V 4      ^,          \        S! WV4      ^,          V 4      ^,          ,           \        S! WV4      ^,          V 4      ^,          ,           4      \        \        S! WV4      ^ ,          V4      ^,          \        S! WV4      ^,          V4      ^,          ,           \        S! WV4      ^,          V4      ^,          ,           4      \        \        S! WV4      ^ ,          V4      ^,          \        S! WV4      ^,          V4      ^,          ,           \        S! WV4      ^,          V4      ^,          ,           4      3# r&   )r   r   )r;   r<   r=   r–   s   &&&€r.   r/   Ú2CoordSys3D._calculate_lame_coeff.<locals>.<lambda>}  s;  ø€ Üœt¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDÜ#¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDõ Eä#¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDõ Eó Fô œt¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDÜ#¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDõ Eä#¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDõ Eó Fô œt¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDÜ#¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDõ Eä#¡I¨b°bÓ$9¸!Õ$<¸bÓAÀ1ÕDõ Eó Fñ
#r1   r4   )r–   s   fr.   r_   Ú CoordSys3D._calculate_lame_coeffp  s   ø€ ô
ð 
	r1   c                ó:   € \        V P                  R,          4      # )z"
Returns inverse rotation matrix.
éÿÿÿÿ)r   rp   r‹   s   &r.   Ú_inverse_rotation_matrixÚ#CoordSys3D._inverse_rotation_matrix‰  s   € ô ˜×4Ñ4°bÕ8Ó9Ð9r1   c                ó„   € \        V \        4      '       d*   V R8X  d   R # V R8X  d   R # V R8X  d   R # \        R4      hR# )	z£
Store information about transformation equations for pre-defined
coordinate systems.

Parameters
==========

curv_coord_name : str
    Name of coordinate system

r$   c                 ó
   € WV3# r3   r4   rA   s   &&&r.   r/   Ú8CoordSys3D._get_transformation_lambdas.<locals>.<lambda>ž  s   € ¨¨a¡yr1   r6   c                 ó¬   € V \        V4      ,          \        V4      ,          V \        V4      ,          \        V4      ,          V \        V4      ,          3# r3   )r   r   r>   s   &&&r.   r/   rÃ      s:   € Ø”c˜%“j•L¤ S£Õ)Ø”c˜%“j•L¤ S£Õ)Ø”c˜%“j•Lñ.r1   r7   c                 óL   € V \        V4      ,          V \        V4      ,          V3# r3   )r   r   rµ   s   &&&r.   r/   rÃ   ¦  s    € Ø”c˜%“j•LØ”c˜%“j•LØñ,r1   rŸ   N)rJ   rE   rL   r    s   &r.   rZ   Ú&CoordSys3D._get_transformation_lambdas�  sa   € ô �o¤s×+Ò+Ø +Ô-Ù0Ð0Ø +Ô-ñð ð
  -Ô/ñð ô
 ð Dó Eð Eñ ,r1   c                ó8   € \        V\        V4      ,          4      # )z²
Returns the transformation equations obtained from rotation matrix.

Parameters
==========

matrix : Matrix
    Rotation matrix

equations : tuple
    Transformation equations

)rM   r(   )r#   Úmatrixr–   s   &&&r.   Ú_rotation_trans_equationsÚ$CoordSys3D._rotation_trans_equations®  s   € ô �Vœf YÓ/Õ/Ó0Ð0r1   c                ó   € V P                   # r3   )rq   r‹   s   &r.   rT   ÚCoordSys3D.origin¿  s   € à�|‰|Ðr1   c                ó   € V P                   # r3   )rf   r‹   s   &r.   rŠ   ÚCoordSys3D.base_vectorsÃ  ó   € Ø×!Ñ!Ð!r1   c                ó   € V P                   # r3   )rh   r‹   s   &r.   Úbase_scalarsÚCoordSys3D.base_scalarsÆ  rÏ   r1   c                ó   € V P                   # r3   )rk   r‹   s   &r.   r[   ÚCoordSys3D.lame_coefficientsÉ  s   € Ø×&Ñ&Ð&r1   c                ó>   € V P                   ! V P                  4       !  # r3   )rj   rÑ   r‹   s   &r.   Útransformation_to_parentÚ#CoordSys3D.transformation_to_parentÌ  s   € Ø×*Ò*¨D×,=Ñ,=Ó,?Ñ@Ð@r1   c                ó„   € V P                   f   \        R4      hV P                  ! V P                   P                  4       !  # )NzHno parent coordinate system, use `transformation_from_parent_function()`)rn   rL   rl   rÑ   r‹   s   &r.   Útransformation_from_parentÚ%CoordSys3D.transformation_from_parentÏ  sD   € Ø�<‰<ÒÜð Gó Hð Hà×6Ò6Ø!Ÿ\™\×6Ñ6Ó8ñ:ð 	:r1   c                ó   € V P                   # r3   ©rl   r‹   s   &r.   Ú#transformation_from_parent_functionÚ.CoordSys3D.transformation_from_parent_functionÖ  s   € Ø×6Ñ6Ð6r1   c                ó(  € ^ RI Hp \        V\        4      '       g   \	        \        V4      R,           4      hW8X  d   \        ^4      # WP                  8X  d   V P                  # VP                  V 8X  d   VP                  P                  # V! W4      w  r4\        ^4      p\        V4       F  pWTV,          P                  ,          pK  	  \        V^,           \        V4      4       F&  pWTV,          P                  P                  ,          pK(  	  V# )a²  
Returns the direction cosine matrix(DCM), also known as the
'rotation matrix' of this coordinate system with respect to
another system.

If v_a is a vector defined in system 'A' (in matrix format)
and v_b is the same vector defined in system 'B', then
v_a = A.rotation_matrix(B) * v_b.

A SymPy Matrix is returned.

Parameters
==========

other : CoordSys3D
    The system which the DCM is generated to.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q1 = symbols('q1')
>>> N = CoordSys3D('N')
>>> A = N.orient_new_axis('A', q1, N.i)
>>> N.rotation_matrix(A)
Matrix([
[1,       0,        0],
[0, cos(q1), -sin(q1)],
[0, sin(q1),  cos(q1)]])

)Ú_pathz is not a CoordSys3D)Úsympy.vector.functionsrà   rJ   r    rK   rE   r   rn   rp   ÚTÚrangeÚlen)r„   Úotherrà   Ú	rootindexÚpathÚresultrB   s   &&     r.   rt   ÚCoordSys3D.rotation_matrixÙ  sà   € õB 	1Ü˜%¤×,Ò,ÜœC ›JØ2õ3ó 4ð 4ð Œ=Ü�q“6ˆMØ—l‘lÔ"Ø×/Ñ/Ð/Ø�]‰]˜dÔ"Ø×0Ñ0×2Ñ2Ð2á Ó,‰ˆ	Ü�Q“ˆÜ�yÖ!ˆAØ˜1•g×5Ñ5Õ5ŠFñ "ä�y 1•}¤c¨$£iÖ0ˆAØ˜1•g×5Ñ5×7Ñ7Õ7ŠFñ 1àˆr1   c                ó8   € V P                   P                  V4      # )aâ  
Returns the position vector of the origin of this coordinate
system with respect to another Point/CoordSys3D.

Parameters
==========

other : Point/CoordSys3D
    If other is a Point, the position of this system's origin
    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')
>>> N1 = N.locate_new('N1', 10 * N.i)
>>> N.position_wrt(N1)
(-10)*N.i

)rT   Úposition_wrt)r„   rå   s   &&r.   rë   ÚCoordSys3D.position_wrt  s   € ð0 �{‰{×'Ñ'¨Ó.Ð.r1   c           	     óš  € \        V P                  V4      P                  V4      4      p\        VP	                  4       4       UUu. uF  w  r4WBV,          ,
          NK  	  pppV P                  V4      \        V4      ,          p\        V P	                  4       4       UUu/ uF  w  r4V\        Wc,          4      bK  	  upp# u uppi u uppi )aë  
Returns a dictionary which expresses the coordinate variables
(base scalars) of this frame in terms of the variables of
otherframe.

Parameters
==========

otherframe : CoordSys3D
    The other system to map the variables to.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import Symbol
>>> A = CoordSys3D('A')
>>> q = Symbol('q')
>>> B = A.orient_new_axis('B', q, A.k)
>>> A.scalar_map(B)
{A.x: B.x*cos(q) - B.y*sin(q), A.y: B.x*sin(q) + B.y*cos(q), A.z: B.z}

)rM   rë   Ú	to_matrixÚ	enumeraterÑ   rt   r(   r   )r„   rå   Úorigin_coordsrB   r)   Úrelocated_scalarsÚvars_matrixs   &&     r.   Ú
scalar_mapÚCoordSys3D.scalar_map(  sÊ   € ô2 ˜d×/Ñ/°Ó6×@Ñ@ÀÓGÓHˆä)2°5×3EÑ3EÓ3GÔ)HôJÙ)H¡ ð ¨qÕ!1×1Ð1Ù)Hð 	ñ Jð ×+Ñ+¨EÓ2ÜÐ/Ó0õ1ˆô & d×&7Ñ&7Ó&9Ô:ô<Ù:‘D�Að ”8˜K�NÓ+Ò+Ù:ò<ð 	<ùóJùó
<s   ÁCÂ Cc                ó`   € Vf   V P                   pVf   V P                  p\        WVVV R7      # )aƒ  
Returns a CoordSys3D with its origin located at the given
position wrt this coordinate system's origin.

Parameters
==========

name : str
    The name of the new CoordSys3D instance.

position : Vector
    The position vector of the new system's origin wrt this
    one.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

Examples
========

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

)rs   r8   r:   rr   )rg   rd   r    )r„   rY   Úpositionr8   r:   s   &&&&&r.   rU   ÚCoordSys3D.locate_newJ  s>   € ð> Ò!Ø!×1Ñ1ˆNØÒØ×-Ñ-ˆLä˜$Ø'3Ø)7Ø!%ô'ð 	'r1   c           	     óÚ  € Vf   V P                   pVf   V P                  p\        V\        4      '       dE   \        V\        4      '       d   VP                  V 4      pMVP                  4       p\        V4      pMb\        \        ^4      4      pV FH  p\        V\        4      '       d   WgP                  V 4      ,          pK2  WgP                  4       ,          pKJ  	  \        WVVVV R7      # )a  
Creates a new CoordSys3D oriented in the user-specified way
with respect to this system.

Please refer to the documentation of the orienter classes
for more information about the orientation procedure.

Parameters
==========

name : str
    The name of the new CoordSys3D instance.

orienters : iterable/Orienter
    An Orienter or an iterable of Orienters for orienting the
    new coordinate system.
    If an Orienter is provided, it is applied to get the new
    system.
    If an iterable is provided, the orienters will be applied
    in the order in which they appear in the iterable.

location : Vector(optional)
    The location of the new coordinate system's origin wrt this
    system's origin. If not specified, the origins are taken to
    be coincident.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q0, q1, q2, q3 = symbols('q0 q1 q2 q3')
>>> N = CoordSys3D('N')

Using an AxisOrienter

>>> from sympy.vector import AxisOrienter
>>> axis_orienter = AxisOrienter(q1, N.i + 2 * N.j)
>>> A = N.orient_new('A', (axis_orienter, ))

Using a BodyOrienter

>>> from sympy.vector import BodyOrienter
>>> body_orienter = BodyOrienter(q1, q2, q3, '123')
>>> B = N.orient_new('B', (body_orienter, ))

Using a SpaceOrienter

>>> from sympy.vector import SpaceOrienter
>>> space_orienter = SpaceOrienter(q1, q2, q3, '312')
>>> C = N.orient_new('C', (space_orienter, ))

Using a QuaternionOrienter

>>> from sympy.vector import QuaternionOrienter
>>> q_orienter = QuaternionOrienter(q0, q1, q2, q3)
>>> D = N.orient_new('D', (q_orienter, ))
)rt   r8   r:   rs   rr   )
rg   rd   rJ   r   r   rt   r   r(   r   r    )r„   rY   Ú	orientersrs   r8   r:   Úfinal_matrixÚorienters   &&&&&&  r.   Ú
orient_newÚCoordSys3D.orient_news  sÐ   € ðB Ò!Ø!×1Ñ1ˆNØÒØ×-Ñ-ˆLä�i¤×*Ò*Ü˜)¤\×2Ò2Ø(×8Ñ8¸Ó>‘à(×8Ñ8Ó:�ô $ LÓ1‰Lä!¤# a£&›>ˆLÛ%�Ü˜h¬×5Ò5Ø ×$<Ñ$<¸TÓ$BÕB’Là ×$<Ñ$<Ó$>Õ>’Lñ	 &ô ˜$Ø'3Ø)7Ø#+Ø!%ô	'ð 	'r1   c                ó‚   € Vf   V P                   pVf   V P                  p\        W#4      pV P                  WVVVR7      # )a±  
Axis rotation is a rotation about an arbitrary axis by
some angle. The angle is supplied as a SymPy expr scalar, and
the axis is supplied as a Vector.

Parameters
==========

name : string
    The name of the new coordinate system

angle : Expr
    The angle by which the new system is to be rotated

axis : Vector
    The axis around which the rotation has to be performed

location : Vector(optional)
    The location of the new coordinate system's origin wrt this
    system's origin. If not specified, the origins are taken to
    be coincident.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q1 = symbols('q1')
>>> N = CoordSys3D('N')
>>> B = N.orient_new_axis('B', q1, N.i + 2 * N.j)

©rs   r8   r:   )rg   rd   r   rü   )r„   rY   ÚangleÚaxisrs   r8   r:   rû   s   &&&&&&& r.   Úorient_new_axisÚCoordSys3D.orient_new_axisÒ  sR   € ðN Ò!Ø!×1Ñ1ˆNØÒØ×-Ñ-ˆLä Ó,ˆØ�‰˜tØ(0Ø,8Ø.<ð ó >ð 	>r1   c	                óD   € \        W#WE4      p	V P                  WVVVR7      # )a  
Body orientation takes this coordinate system through three
successive simple rotations.

Body fixed rotations include both Euler Angles and
Tait-Bryan Angles, see https://en.wikipedia.org/wiki/Euler_angles.

Parameters
==========

name : string
    The name of the new coordinate system

angle1, angle2, angle3 : Expr
    Three successive angles to rotate the coordinate system by

rotation_order : string
    String defining the order of axes for rotation

location : Vector(optional)
    The location of the new coordinate system's origin wrt this
    system's origin. If not specified, the origins are taken to
    be coincident.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q1, q2, q3 = symbols('q1 q2 q3')
>>> N = CoordSys3D('N')

A 'Body' fixed rotation is described by three angles and
three body-fixed rotation axes. To orient a coordinate system D
with respect to N, each sequential rotation is always about
the orthogonal unit vectors fixed to D. For example, a '123'
rotation will specify rotations about N.i, then D.j, then
D.k. (Initially, D.i is same as N.i)
Therefore,

>>> D = N.orient_new_body('D', q1, q2, q3, '123')

is same as

>>> D = N.orient_new_axis('D', q1, N.i)
>>> D = D.orient_new_axis('D', q2, D.j)
>>> D = D.orient_new_axis('D', q3, D.k)

Acceptable rotation orders are of length 3, expressed in XYZ or
123, and cannot have a rotation about about an axis twice in a row.

>>> B = N.orient_new_body('B', q1, q2, q3, '123')
>>> B = N.orient_new_body('B', q1, q2, 0, 'ZXZ')
>>> B = N.orient_new_body('B', 0, 0, 0, 'XYX')

rÿ   )r   rü   ©
r„   rY   Úangle1Úangle2Úangle3Úrotation_orderrs   r8   r:   rû   s
   &&&&&&&&& r.   Úorient_new_bodyÚCoordSys3D.orient_new_body  s2   € ôB   °ÓGˆØ�‰˜tØ(0Ø,8Ø.<ð ó >ð 	>r1   c	                óD   € \        W#WE4      p	V P                  WVVVR7      # )a[  
Space rotation is similar to Body rotation, but the rotations
are applied in the opposite order.

Parameters
==========

name : string
    The name of the new coordinate system

angle1, angle2, angle3 : Expr
    Three successive angles to rotate the coordinate system by

rotation_order : string
    String defining the order of axes for rotation

location : Vector(optional)
    The location of the new coordinate system's origin wrt this
    system's origin. If not specified, the origins are taken to
    be coincident.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

See Also
========

CoordSys3D.orient_new_body : method to orient via Euler
    angles

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q1, q2, q3 = symbols('q1 q2 q3')
>>> N = CoordSys3D('N')

To orient a coordinate system D with respect to N, each
sequential rotation is always about N's orthogonal unit vectors.
For example, a '123' rotation will specify rotations about
N.i, then N.j, then N.k.
Therefore,

>>> D = N.orient_new_space('D', q1, q2, q3, '312')

is same as

>>> B = N.orient_new_axis('B', q1, N.i)
>>> C = B.orient_new_axis('C', q2, N.j)
>>> D = C.orient_new_axis('D', q3, N.k)

rÿ   )r   rü   r  s
   &&&&&&&&& r.   Úorient_new_spaceÚCoordSys3D.orient_new_spaceK  s2   € ôv ! °ÓHˆØ�‰˜tØ(0Ø,8Ø.<ð ó >ð 	>r1   c	                óD   € \        W#WE4      p	V P                  WVVVR7      # )aN  
Quaternion orientation orients the new CoordSys3D with
Quaternions, defined as a finite rotation about lambda, a unit
vector, by some amount theta.

This orientation is described by four parameters:

q0 = cos(theta/2)

q1 = lambda_x sin(theta/2)

q2 = lambda_y sin(theta/2)

q3 = lambda_z sin(theta/2)

Quaternion does not take in a rotation order.

Parameters
==========

name : string
    The name of the new coordinate system

q0, q1, q2, q3 : Expr
    The quaternions to rotate the coordinate system by

location : Vector(optional)
    The location of the new coordinate system's origin wrt this
    system's origin. If not specified, the origins are taken to
    be coincident.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> from sympy import symbols
>>> q0, q1, q2, q3 = symbols('q0 q1 q2 q3')
>>> N = CoordSys3D('N')
>>> B = N.orient_new_quaternion('B', q0, q1, q2, q3)

rÿ   )r   rü   )
r„   rY   Úq0Úq1Úq2Úq3rs   r8   r:   rû   s
   &&&&&&&&& r.   Úorient_new_quaternionÚ CoordSys3D.orient_new_quaternionŒ  s2   € ôb & b¨bÓ5ˆØ�‰˜tØ(0Ø,8Ø.<ð ó >ð 	>r1   c                ó   € \        WVW4R7      # )aZ  
Returns a CoordSys3D which is connected to self by transformation.

Parameters
==========

name : str
    The name of the new CoordSys3D instance.

transformation : Lambda, Tuple, str
    Transformation defined by transformation equations or chosen
    from predefined ones.

vector_names, variable_names : iterable(optional)
    Iterables of 3 strings each, with custom names for base
    vectors and base scalars of the new system respectively.
    Used for simple str printing.

Examples
========

>>> from sympy.vector import CoordSys3D
>>> a = CoordSys3D('a')
>>> b = a.create_new('b', transformation='spherical')
>>> b.transformation_to_parent()
(b.r*sin(b.theta)*cos(b.phi), b.r*sin(b.phi)*sin(b.theta), b.r*cos(b.theta))
>>> b.transformation_from_parent()
(sqrt(a.x**2 + a.y**2 + a.z**2), acos(a.z/sqrt(a.x**2 + a.y**2 + a.z**2)), atan2(a.y, a.x))

)rr   r5   r:   r8   )r    )r„   rY   r5   r:   r8   s   &&&&&r.   Ú
create_newÚCoordSys3D.create_newÃ  s   € ô> ˜$¸NØ)7ôTð 	Tr1   c                ó   € R # r3   r4   )r„   rY   rs   rt   rr   r8   r:   rz   r{   r   r€   r5   s   &&&&&&&&&&&&r.   Ú__init__ÚCoordSys3D.__init__å  s   € ñ
 	r1   c                ó²   a aaaaa€ V 3R  loVf   S# VP                  4        Uu. uF  q1P                  V4      NK  	  upw  oooVVV3R loVV3R l# u upi )c                 ó4   <€ \         P                  SWV34      # r3   )r    rÉ   )r)   r*   r+   Úrots   &&&€r.   r/   Ú>CoordSys3D._compose_rotation_and_translation.<locals>.<lambda>ð  s   ø€ œJ×@Ñ@ÀÀqÈQÀiÔPr1   c                 ó8   <€ V S,           VS,           VS,           3# r3   r4   )r)   r*   r+   ÚdxÚdyÚdzs   &&&€€€r.   r/   r  õ  s   ø€ Ø��FØ��FØ��Fñ
r1   c                 ó   <€ S! S! WV4      !  # r3   r4   )r)   r*   r+   r-   Úts   &&&€€r.   r/   r  ú  s   ø€ ™q¡! A¨!£*š~r1   )rŠ   r•   )	r  Útranslationrr   rB   r!  r"  r#  r-   r%  s	   f&& @@@@@r.   rV   Ú,CoordSys3D._compose_rotation_and_translationî  sS   ý€ äPˆØŠ>ØˆHà28×2EÑ2EÔ2GÓHÑ2G¨Q—o‘o aÖ(Ñ2GÑH‰
ˆˆB�ö
ˆõ
 .Ð-ùò Is   ¥ArÜ   )NNNNNN)NN)NNN)
NNNNNNNNNN)*Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ra   r†   rŒ   Ústaticmethodr^   r]   r­   rX   r_   r¿   rZ   ÚclassmethodrÉ   ÚpropertyrT   rŠ   rÑ   r[   rÖ   rÙ   rÝ   rt   r   rë   ró   rU   rü   r  r
  r  r  r  r  rV   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r�   Ú__classdict__s   @@r.   r    r       sO  ù‡ € ñ÷^ò@ò)ð ñ ó ð ðD ñAó ðAò<að$ ñHó ðHð. ñó ðò0:ð ñEó ðEð< ñ1ó ð1ð  ñó ðò"ò"ò'òAò:ò7ò3ðj ñ/ó ð/ò2 <ôD''ôR]'ô~0>ôdE>ôN?>ôB5>ôn TôDð —‘€HÔàñ.ó ÷.ð .r1   r    c                 ó¢   € V R ,           p\        V4      ^8w  d   \        V4      hV F$  p\        V\        4      '       d   K  \	        V4      h	  R# )z& must be an iterable of 3 string-typesN)rä   rL   rJ   rE   rK   )Úarg_nameÚargÚerrorstrÚss   &&  r.   rc   rc   ý  sE   € ØÐBÕB€HÜ
ˆ3ƒx�1„}Ü˜Ó"Ð"ÛˆÜ˜!œS×!Ô!Ü˜HÓ%Ð%ó r1   )re   )3Úcollections.abcr   Úsympy.core.basicr   Úsympy.core.cacher   Ú
sympy.corer   r   r   Úsympy.core.symbolr	   r
   Úsympy.matrices.immutabler   r(   Úsympy.matrices.matrixbaser   Úsympy.solversr   Úsympy.vector.scalarr   Úsympy.core.containersr   Úsympy.core.functionr   Ú(sympy.functions.elementary.miscellaneousr   Ú(sympy.functions.elementary.trigonometricr   r   r   r   Úsympy.matrices.denser   Úsympy.simplify.simplifyr   Úsympy.simplify.trigsimpr   Úsympy.vectorrF   Úsympy.vector.orientersr   r   r   r   r   r    rc   Úsympy.vector.vectorre   r4   r1   r.   Ú<module>rL     si   ðÝ $å "Ý $ß 'Ñ 'Ý !Ý %Ý CÝ 0Ý Ý *Ý 'Ý $Ý 9ß LÓ LÝ $Ý 9Ý ,Ý ,Û ÷Gõ Gôa.�ô a.òH&÷ +r1   