+
    i              	       v    ^ RI Ht ^ RIHtHtHtHt ^ RIHt . ROt	RR lt
R t ! R R]! RRR	.4      4      tR
# )    )sympify)PointDyadicReferenceFrameouter)
namedtupleInertiac                   \        V \        4      '       g   \        R4      h\        V4      \        V4      \        V4      r2p\        V4      \        V4      \        V4      repV\	        V P
                  V P
                  4      ,          V\	        V P
                  V P                  4      ,          ,           V\	        V P
                  V P                  4      ,          ,           V\	        V P                  V P
                  4      ,          ,           V\	        V P                  V P                  4      ,          ,           V\	        V P                  V P                  4      ,          ,           V\	        V P                  V P
                  4      ,          ,           V\	        V P                  V P                  4      ,          ,           V\	        V P                  V P                  4      ,          ,           # )a  Simple way to create inertia Dyadic object.

Explanation
===========

Creates an inertia Dyadic based on the given tensor values and a body-fixed
reference frame.

Parameters
==========

frame : ReferenceFrame
    The frame the inertia is defined in.
ixx : Sympifyable
    The xx element in the inertia dyadic.
iyy : Sympifyable
    The yy element in the inertia dyadic.
izz : Sympifyable
    The zz element in the inertia dyadic.
ixy : Sympifyable
    The xy element in the inertia dyadic.
iyz : Sympifyable
    The yz element in the inertia dyadic.
izx : Sympifyable
    The zx element in the inertia dyadic.

Examples
========

>>> from sympy.physics.mechanics import ReferenceFrame, inertia
>>> N = ReferenceFrame('N')
>>> inertia(N, 1, 2, 3)
(N.x|N.x) + 2*(N.y|N.y) + 3*(N.z|N.z)

z%Need to define the inertia in a frame)
isinstancer   	TypeErrorr   r   xyz)frameixxiyyizzixyiyzizxs   &&&&&&&]/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/physics/mechanics/inertia.pyinertiar      sN   J e^,,?@@CL'#,cCCL'#,cCegguww''#eEGGUWW.E*EEegguww''(*-eEGGUWW.E*EFegguww''(*-eEGGUWW.E*EF egguww''( +.eEGGUWW.E*EF egguww''	( )    c                0   V \        VP                  VP                  4      \        VP                  VP                  4      ,           \        VP                  VP                  4      ,           VP	                  V4      ,          \        W4      ,
          ,          # )a  Inertia dyadic of a point mass relative to point O.

Parameters
==========

mass : Sympifyable
    Mass of the point mass
pos_vec : Vector
    Position from point O to point mass
frame : ReferenceFrame
    Reference frame to express the dyadic in

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.mechanics import ReferenceFrame, inertia_of_point_mass
>>> N = ReferenceFrame('N')
>>> r, m = symbols('r m')
>>> px = r * N.x
>>> inertia_of_point_mass(m, px, N)
m*r**2*(N.y|N.y) + m*r**2*(N.z|N.z)

)r   r   r   r   dot)masspos_vecr   s   &&&r   inertia_of_point_massr   8   ss    4 	uww	 	uww	 
!	uww	 
! 
W		 "'w!8	9: :r   c                   b   a a ] tR t^Yt oRtRtV 3R lt]RR l4       tR t	R t
]	t]
tRtVtV ;t# )r	   a  Inertia object consisting of a Dyadic and a Point of reference.

Explanation
===========

This is a simple class to store the Point and Dyadic, belonging to an
inertia.

Attributes
==========

dyadic : Dyadic
    The dyadic of the inertia.
point : Point
    The reference point of the inertia.

Examples
========

>>> from sympy.physics.mechanics import ReferenceFrame, Point, Inertia
>>> N = ReferenceFrame('N')
>>> Po = Point('Po')
>>> Inertia(N.x.outer(N.x) + N.y.outer(N.y) + N.z.outer(N.z), Po)
((N.x|N.x) + (N.y|N.y) + (N.z|N.z), Po)

In the example above the Dyadic was created manually, one can however also
use the ``inertia`` function for this or the class method ``from_tensor`` as
shown below.

>>> Inertia.from_inertia_scalars(Po, N, 1, 1, 1)
((N.x|N.x) + (N.y|N.y) + (N.z|N.z), Po)

c                  < \        V\        4      '       d   \        V\        4      '       d   Yr\        V\        4      '       g   \        R 4      h\        V\        4      '       g   \        R4      h\        SV `  WV4      # )z'Reference point should be of type Pointz-Inertia value should be expressed as a Dyadic)r   r   r   r   super__new__)clsdyadicpoint	__class__s   &&&r   r"   Inertia.__new__}   sd    fe$$E6)B)B"6%''EFF&&))KLLwsE22r   c	                ,    V ! \        W#WEWgV4      V4      # )a  Simple way to create an Inertia object based on the tensor values.

Explanation
===========

This class method uses the :func`~.inertia` to create the Dyadic based
on the tensor values.

Parameters
==========

point : Point
    The reference point of the inertia.
frame : ReferenceFrame
    The frame the inertia is defined in.
ixx : Sympifyable
    The xx element in the inertia dyadic.
iyy : Sympifyable
    The yy element in the inertia dyadic.
izz : Sympifyable
    The zz element in the inertia dyadic.
ixy : Sympifyable
    The xy element in the inertia dyadic.
iyz : Sympifyable
    The yz element in the inertia dyadic.
izx : Sympifyable
    The zx element in the inertia dyadic.

Examples
========

>>> from sympy import symbols
>>> from sympy.physics.mechanics import ReferenceFrame, Point, Inertia
>>> ixx, iyy, izz, ixy, iyz, izx = symbols('ixx iyy izz ixy iyz izx')
>>> N = ReferenceFrame('N')
>>> P = Point('P')
>>> I = Inertia.from_inertia_scalars(P, N, ixx, iyy, izz, ixy, iyz, izx)

The tensor values can easily be seen when converting the dyadic to a
matrix.

>>> I.dyadic.to_matrix(N)
Matrix([
[ixx, ixy, izx],
[ixy, iyy, iyz],
[izx, iyz, izz]])

)r   )	r#   r%   r   r   r   r   r   r   r   s	   &&&&&&&&&r   from_inertia_scalarsInertia.from_inertia_scalars   s    f 75s3?GGr   c                v    \        R V P                  P                   RVP                  P                   R24      h)z$unsupported operand type(s) for +: '' and ''r   r&   __name__selfothers   &&r   __add__Inertia.__add__   @      NN334 5!OO445Q8 9 	9r   c                v    \        R V P                  P                   RVP                  P                   R24      h)z$unsupported operand type(s) for *: 'r,   r-   r.   r0   s   &&r   __mul__Inertia.__mul__   r5   r    r   r   r   )r/   
__module____qualname____firstlineno____doc__	__slots__r"   classmethodr)   r3   r7   __radd____rmul____static_attributes____classdictcell____classcell__)r&   __classdict__s   @@r   r	   r	   Y   sF      B I3 2H 2Hh9
9
 HHHr   r$   r%   N)r   r   r	   r:   )sympyr   sympy.physics.vectorr   r   r   r   collectionsr   __all__r   r   r	   r9   r   r   <module>rK      s<     E E "
9-)`:BnjXw$78 nr   