+
    ‹°³j.  ã                   óü   € ^ RI Ht ^ RIHt ^ RIHt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t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR tR# )é    )ÚBasic)Úsympify)ÚcosÚsin)ÚeyeÚ	rot_axis1Ú	rot_axis2Ú	rot_axis3)ÚImmutableDenseMatrix)Úcacheit)ÚStrNc                   ó*   a € ] tR t^t o RtR tRtV tR# )ÚOrienterz'
Super-class for all orienter classes.
c                ó   € V P                   # )z>
The rotation matrix corresponding to this orienter
instance.
)Ú_parent_orient©Úselfs   &ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/sympy/vector/orienters.pyÚrotation_matrixÚOrienter.rotation_matrix   s   € ð
 ×"Ñ"Ð"ó    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s   ø‡ € ñ÷#ð #r   r   c                   ól   a a€ ] tR t^t oRtV 3R ltR t]R 4       t]	R 4       t
]	R 4       tRtVtV ;t# )ÚAxisOrienterz#
Class to denote an axis orienter.
c                óÀ   <€ \        V\        P                  P                  4      '       g   \	        R 4      h\        V4      p\        SV `  WV4      pWn        W#n	        V# )zaxis should be a Vector)
Ú
isinstanceÚsympyÚvectorÚVectorÚ	TypeErrorr   ÚsuperÚ__new__Ú_angleÚ_axis)ÚclsÚangleÚaxisÚobjÚ	__class__s   &&& €r   r+   ÚAxisOrienter.__new__   sN   ø€ Ü˜$¤§¡× 3Ñ 3×4Ò4ÜÐ5Ó6Ð6Ü˜“ˆä‰g‰o˜c¨$Ó/ˆØŒ
ØŒ	àˆ
r   c                ó   € R# )aI  
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
==========

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

Examples
========

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

Nr   )r   r/   r0   s   &&&r   Ú__init__ÚAxisOrienter.__init__(   s   € ñ8 	r   c                ó  € \         P                  P                  V P                  V4      P	                  4       pVP                  V4      pV P                  p\        ^4      W"P                  ,          ,
          \        V4      ,          \        ^ V^,          ) V^,          .V^,          ^ V^ ,          ) .V^,          ) V^ ,          ^ ..4      \        V4      ,          ,           W"P                  ,          ,           pVP                  pV# )z¸
The rotation matrix corresponding to this orienter
instance.

Parameters
==========

system : CoordSys3D
    The coordinate system wrt which the rotation matrix
    is to be computed
)r&   r'   Úexpressr0   Ú	normalizeÚ	to_matrixr/   r   ÚTr   ÚMatrixr   )r   Úsystemr0   ÚthetaÚparent_orients   &&   r   r   ÚAxisOrienter.rotation_matrixF   s×   € ô �|‰|×#Ñ# D§I¡I¨vÓ6×@Ñ@ÓBˆØ�~‰~˜fÓ%ˆØ—
‘
ˆÜ˜a›& 4¯&©&¥=Õ0´C¸³JÕ>Ü ! d¨1¥g X¨t°A­wÐ!7Ø"& q¥'¨1¨t°A­w¨hÐ!7Ø#'¨¥7 (¨D°­G°QÐ!7ð!9ó :ä<?À»JõGõGð §¡�õ	'ˆð
 &Ÿ™ˆØÐr   c                ó   € V P                   # ©N)r,   r   s   &r   r/   ÚAxisOrienter.angle_   s   € à�{‰{Ðr   c                ó   € V P                   # rB   )r-   r   s   &r   r0   ÚAxisOrienter.axisc   s   € à�z‰zÐr   r   )r   r   r   r   r   r+   r5   r   r   Úpropertyr/   r0   r   r   Ú__classcell__©r2   r!   s   @@r   r#   r#      sU   ù‡ € ñõ	òð< ñó ðð0 ñó ðð ñó ÷ð r   r#   c                   óv   a a€ ] tR t^ht oRtV 3R lt]R 4       t]R 4       t]R 4       t	]R 4       t
RtVtV ;t# )ÚThreeAngleOrienterz+
Super-class for Body and Space orienters.
c           	     óæ  <€ \        V\        4      '       d   VP                  pR
pTp\        V4      P	                  4       p\        V4      ^8X  g   \        R4      hV Uu. uF  qwP                  RR4      NK  	  ppV Uu. uF  qwP                  RR4      NK  	  ppV Uu. uF  qwP                  RR4      NK  	  ppRP                  V4      pWE9  d   \        R	4      h\        V^ ,          4      p\        V^,          4      p	\        V^,          4      p
\        V4      p\        V4      p\        V4      pV P                  '       d-   \        W�4      \        W’4      ,          \        W£4      ,          pM+\        W£4      \        W’4      ,          \        W�4      ,          pVP                  p\        SV `=  WW#\        V4      4      pWn        W,n        W<n        Wln        W¼n        V# u upi u upi u upi )Ú123Ú z%rot_order should be a str of length 3ÚXÚ1ÚYÚ2ÚZÚ3zInvalid rot_type parameter)rL   Ú231Ú312Ú132Ú213Ú321Ú121Ú131Ú212Ú232Ú313Ú323rM   )r%   r   ÚnameÚstrÚupperÚlenr)   ÚreplaceÚjoinÚintr   Ú	_in_orderÚ_rotr;   r*   r+   Ú_angle1Ú_angle2Ú_angle3Ú
_rot_orderr   )r.   Úangle1Úangle2Úangle3Ú	rot_orderÚapproved_ordersÚoriginal_rot_orderÚiÚa1Úa2Úa3r?   r1   r2   s   &&&&&        €r   r+   ÚThreeAngleOrienter.__new__m   s¯  ø€ Ü�i¤×%Ò%Ø!Ÿ™ˆIð-ˆð 'ÐÜ˜	“N×(Ñ(Ó*ˆ	Ü�I“ !Ô#ÜÐCÓDÐDÙ2;Ó<±)¨Q—Y‘Y˜s CÖ(±)ˆ	Ð<Ù2;Ó<±)¨Q—Y‘Y˜s CÖ(±)ˆ	Ð<Ù2;Ó<±)¨Q—Y‘Y˜s CÖ(±)ˆ	Ð<Ø—G‘G˜IÓ&ˆ	ØÔ+ÜÐ8Ó9Ð9Ü�˜1•ÓˆÜ�˜1•ÓˆÜ�˜1•ÓˆÜ˜“ˆÜ˜“ˆÜ˜“ˆØ�=�=ˆ=Ü! "Ó-Ü! "Ó-õ.ä! "Ó-õ.‰Mô " "Ó-Ü! "Ó-õ.ä! "Ó-õ.ˆMð &Ÿ™ˆä‰g‰oØ˜¬¨Y«ó9ˆàŒØŒØŒØ+ŒØ*Ôàˆ
ùò= =ùÚ<ùÚ<s   Á G$Â G)Â G.c                ó   € V P                   # rB   )rh   r   s   &r   rl   ÚThreeAngleOrienter.angle1˜   ó   € à�|‰|Ðr   c                ó   € V P                   # rB   )ri   r   s   &r   rm   ÚThreeAngleOrienter.angle2œ   ry   r   c                ó   € V P                   # rB   )rj   r   s   &r   rn   ÚThreeAngleOrienter.angle3    ry   r   c                ó   € V P                   # rB   )rk   r   s   &r   ro   ÚThreeAngleOrienter.rot_order¤   s   € à�‰Ðr   r   )r   r   r   r   r   r+   rF   rl   rm   rn   ro   r   r   rG   rH   s   @@r   rJ   rJ   h   se   ù‡ € ñõ)ðV ñó ðð ñó ðð ñó ðð ñó ÷ð r   rJ   c                   ó4   a € ] tR t^©t o RtRtR tR tRtV t	R# )ÚBodyOrienterz"
Class to denote a body-orienter.
Tc                ó4   € \         P                  WW#V4      pV# rB   ©rJ   r+   ©r.   rl   rm   rn   ro   r1   s   &&&&& r   r+   ÚBodyOrienter.__new__°   ó   € Ü ×(Ñ(¨°fØ)2ó4ˆàˆ
r   c                ó   € R# )aZ  
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
==========

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

rotation_order : string
    String defining the order of axes for rotation

Examples
========

>>> from sympy.vector import CoordSys3D, BodyOrienter
>>> 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,

>>> body_orienter = BodyOrienter(q1, q2, q3, '123')
>>> D = N.orient_new('D', (body_orienter, ))

is same as

>>> from sympy.vector import AxisOrienter
>>> axis_orienter1 = AxisOrienter(q1, N.i)
>>> D = N.orient_new('D', (axis_orienter1, ))
>>> axis_orienter2 = AxisOrienter(q2, D.j)
>>> D = D.orient_new('D', (axis_orienter2, ))
>>> axis_orienter3 = AxisOrienter(q3, D.k)
>>> D = D.orient_new('D', (axis_orienter3, ))

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.

>>> body_orienter1 = BodyOrienter(q1, q2, q3, '123')
>>> body_orienter2 = BodyOrienter(q1, q2, 0, 'ZXZ')
>>> body_orienter3 = BodyOrienter(0, 0, 0, 'XYX')

Nr   ©r   rl   rm   rn   ro   s   &&&&&r   r5   ÚBodyOrienter.__init__µ   s   € ñn 	r   r   N©
r   r   r   r   r   rf   r+   r5   r   r   r    s   @r   r�   r�   ©   s    ø‡ € ñð €Iò÷
7ð 7r   r�   c                   ó4   a € ] tR t^ït o RtRtR tR tRtV t	R# )ÚSpaceOrienterz#
Class to denote a space-orienter.
Fc                ó4   € \         P                  WW#V4      pV# rB   rƒ   r„   s   &&&&& r   r+   ÚSpaceOrienter.__new__ö   r†   r   c                ó   € R# )aš  
Space rotation is similar to Body rotation, but the rotations
are applied in the opposite order.

Parameters
==========

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

rotation_order : string
    String defining the order of axes for rotation

See Also
========

BodyOrienter : Orienter to orient systems wrt Euler angles.

Examples
========

>>> from sympy.vector import CoordSys3D, SpaceOrienter
>>> 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,

>>> space_orienter = SpaceOrienter(q1, q2, q3, '312')
>>> D = N.orient_new('D', (space_orienter, ))

is same as

>>> from sympy.vector import AxisOrienter
>>> axis_orienter1 = AxisOrienter(q1, N.i)
>>> B = N.orient_new('B', (axis_orienter1, ))
>>> axis_orienter2 = AxisOrienter(q2, N.j)
>>> C = B.orient_new('C', (axis_orienter2, ))
>>> axis_orienter3 = AxisOrienter(q3, N.k)
>>> D = C.orient_new('C', (axis_orienter3, ))

Nr   rˆ   s   &&&&&r   r5   ÚSpaceOrienter.__init__û   s   € ñ` 	r   r   NrŠ   r    s   @r   rŒ   rŒ   ï   s    ø‡ € ñð €Iò÷
0ð 0r   rŒ   c                   ó|   a a€ ] tR tRt oRtV 3R ltR t]R 4       t]R 4       t	]R 4       t
]R 4       tR	tVtV ;t# )
ÚQuaternionOrienteri.  z(
Class to denote a quaternion-orienter.
c           	     ób  <€ \        V4      p\        V4      p\        V4      p\        V4      p\        V^,          V^,          ,           V^,          ,
          V^,          ,
          ^W#,          W,          ,
          ,          ^W,          W$,          ,           ,          .^W#,          W,          ,           ,          V^,          V^,          ,
          V^,          ,           V^,          ,
          ^W4,          W,          ,
          ,          .^W$,          W,          ,
          ,          ^W,          W4,          ,           ,          V^,          V^,          ,
          V^,          ,
          V^,          ,           ..4      pVP                  p\        SV `  WW#V4      pWn        W&n        W6n        WFn        WVn	        V# )é   )
r   r<   r;   r*   r+   Ú_q0Ú_q1Ú_q2Ú_q3r   )r.   Úq0Úq1Úq2Úq3r?   r1   r2   s   &&&&&  €r   r+   ÚQuaternionOrienter.__new__3  s_  ø€ Ü�R‹[ˆÜ�R‹[ˆÜ�R‹[ˆÜ�R‹[ˆÜ "¨¥'¨B°!­GÕ"3°b¸AµgÕ"=Ø"$¨¥'õ#*à"# r¥w°µÕ'8Õ"9Ø"# r¥w°µÕ'8Õ"9ð";ð #$ r¥w°µÕ'8Õ"9Ø"$¨¥'¨B°!­GÕ"3Ø"$¨¥'õ#*Ø,.°!­Gõ#4à"# r¥w°µÕ'8Õ"9ð";ð #$ r¥w°µÕ'8Õ"9Ø"# r¥w°µÕ'8Õ"9Ø"$¨¥'¨B°!­GÕ"3Ø"$¨¥'õ#*Ø,.°!­Gõ#4ð"5ð!6ó 7ˆð &Ÿ™ˆä‰g‰o˜c r¨rÓ2ˆØŒØŒØŒØŒØ*Ôàˆ
r   c                ó   € R# )að  
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
==========

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

Examples
========

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

Nr   rˆ   s   &&&&&r   r5   ÚQuaternionOrienter.__init__O  s   € ñJ 	r   c                ó   € V P                   # rB   )r•   r   s   &r   r™   ÚQuaternionOrienter.q0v  ó   € à�x‰xˆr   c                ó   € V P                   # rB   )r–   r   s   &r   rš   ÚQuaternionOrienter.q1z  r¢   r   c                ó   € V P                   # rB   )r—   r   s   &r   r›   ÚQuaternionOrienter.q2~  r¢   r   c                ó   € V P                   # rB   )r˜   r   s   &r   rœ   ÚQuaternionOrienter.q3‚  r¢   r   r   )r   r   r   r   r   r+   r5   rF   r™   rš   r›   rœ   r   r   rG   rH   s   @@r   r’   r’   .  sj   ù‡ € ñõò8%ðN ñó ðð ñó ðð ñó ðð ñó ÷ð r   r’   c                óä   € V ^8X  d   \        \        V4      P                  4      # V ^8X  d   \        \        V4      P                  4      # V ^8X  d   \        \	        V4      P                  4      # R# )z)DCM for simple axis 1, 2 or 3 rotations. N)r<   r   r;   r	   r
   )r0   r/   s   &&r   rg   rg   ‡  s^   € àˆq„yÜ”i Ó&×(Ñ(Ó)Ð)Ø	�ŒÜ”i Ó&×(Ñ(Ó)Ð)Ø	�ŒÜ”i Ó&×(Ñ(Ó)Ð)ñ 
r   )Úsympy.core.basicr   Úsympy.core.sympifyr   Ú(sympy.functions.elementary.trigonometricr   r   Úsympy.matrices.denser   r   r	   r
   Úsympy.matrices.immutabler   r<   Úsympy.core.cacher   Úsympy.core.symbolr   Úsympy.vectorr&   r   r#   rJ   r�   rŒ   r’   rg   r   r   r   Ú<module>r²      sz   ðÝ "Ý &ß ?ß GÓ GÝ CÝ $Ý !Û ô
#ˆuô 
#ôM�8ô Mô`>˜ô >ôBCÐ%ô CôL<Ð&ô <ô~V˜ô Vôr*r   