+
    iK                         R t ^ RIHt ^ RIHtHt ^ RIHtHtH	t	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Ht ^ R	IHt ^ R
IHt ]! RRR./R7      t ! R R4      tR# )zJ
This module can be used to solve probelsm related to 2D parabolic arches
)sympify)Symbolsymbols)diffsqrtcossinatanradMin)Eq)solve)	Piecewise)plot)limit)doctest_depends_on)import_modulenumpyfromlistarange)import_kwargsc                     a  ] tR t^t o RtR t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       tRR
 ltR tRR ltRR ltRR ltR tRR ltRR ltRR ltR t]! RR7      R 4       tR tR tR tR tRtV tR	# )Archa  
This class is used to solve problems related to a three hinged arch(determinate) structure.

An arch is a curved vertical structure spanning an open space underneath it.

Arches can be used to reduce the bending moments in long-span structures.


Arches are used in structural engineering(over windows, door and even bridges)

because they can support a very large mass placed on top of them.

Example
========
>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,0),crown_x=5,crown_y=5)
>>> a.get_shape_eqn
5 - (x - 5)**2/5

>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,1),crown_x=6)
>>> a.get_shape_eqn
9/5 - (x - 6)**2/20
c           	        R V n         \        V^ ,          4      \        V^,          4      3V n        \        V^ ,          4      \        V^,          4      3V n        R V n        R V n        RV9   d   \        VR,          4      V n        RV9   d   \        VR,          4      V n        V P                  V n         / V n        / V n        RV P                  RV P                  /V n	        / V n
        RRRR/V n        R V n        R V n        \        R4      ^ \        R	4      ^ \        R
4      ^ \        R4      ^ /V n        \!        4       V n        \!        4       V n        / V n        / V n        / V n        / V n        \/        R4      V n        \/        R4      V n        \/        R4      V n        \/        R4      V n        R V n        R V n        R V n        R # )Ncrown_xcrown_yconcentrateddistributedlefthingerightR_A_xR_A_yR_B_xR_B_y    T)
_shape_eqnr   _left_support_right_support_crown_x_crown_yget_shape_eqn_conc_loads_distributed_loads_loads_loads_applied	_supports_member_member_forcer   _reaction_forceset_points_disc_x_points_disc_y	_moment_x	_moment_y_load_x_load_yr   _moment_x_func_moment_y_func_load_x_func_load_y_func_bending_moment_shear_force_axial_force)selfleft_supportright_supportkwargss   &&&,d/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/physics/continuum_mechanics/arch.py__init__Arch.__init__&   s   &|A7Q8PQ 'a(8 9'-PQBR:ST#F9$56DM#F9$56DM,,"$%t'7'7tG^G^_  '':! &w6'?1fWoVWY_`gYhijk!e!e'1'1%h/%h/#      c                   V P                   '       d   V P                   # \        R4      w  rp\        RRR7      pV P                  '       d   V P                  '       d   V P                  pV P                  pWAV,
          ^,          ,          V,           V,
          pVP                  WP                  ^ ,          W P                  ^,          /4      p\        W4      p	V	^ ,          W,
          ^,          ,          V,           pVP                  WP                  ^ ,          /4      V P                  ^,          8w  d   \        R4      h V# V P                  '       Ed	   V P                  pWAV,
          ^,          ,          V,           V,
          pVP                  WP                  ^ ,          W P                  ^,          /4      pVP                  WP                  ^ ,          W P                  ^,          /4      p
\        W3WC34      p	\        V	4      ^8  g   W,          ^ 8X  d   \        R4      hW,          W,
          ^,          ,          W,          ,           pW,          V n        V# \        R4      h)z3returns the equation of the shape of arch developedzx y caF)positivezQprovided coordinates of crown and supports are not consistent with parabolic archzYparabolic arch cannot be constructed with the provided coordinates, try providing crown_yz(please provide crown_x to construct arch)r'   r   r   r*   r+   subsr(   r   r)   
ValueErrorlenKeyError)rC   xycrL   x0y0parabola_eqneq1solutioneq2s   &          rG   r,   Arch.get_shape_eqnH   s    ?????" A3&===T]]]--BBdQY;+a/L##Q'9'9!'<a@R@RST@U$VWCc'H#A;qy025L  !$7$7$:!;<@S@STU@VV !tuu W"  ]]]--BdQY;?Q.L##Q'9'9!'<a@R@RST@U$VWC##Q':':1'=qATATUVAW$XYCcYu-H8}a8;!#3 !|}}#;qy0(+=L$KDM
  EFFrJ   c                    V P                   # )zL
return the position of the applied load and angle (for concentrated loads)
)r/   rC   s   &rG   	get_loadsArch.get_loadsj   s    
 {{rJ   c                    V P                   # )z
Returns the type of support
)r1   r]   s   &rG   supportsArch.supportsq   s    
 ~~rJ   c                    V P                   # )z+
Returns the position of the left support.
)r(   r]   s   &rG   rD   Arch.left_supportx   s    
 !!!rJ   c                    V P                   # )z,
Returns the position of the right support.
)r)   r]   s   &rG   rE   Arch.right_support   s    
 """rJ   c                    V P                   # )z&
return the reaction forces generated
)r4   r]   s   &rG   reaction_forceArch.reaction_force   s    
 ###rJ   Nc                N	   \        R4      p\        R4      p\        R4      p	\        V4      p\        V4      p\        V4      pW P                  9   d   \        R4      hVR9   d   \        R4      hV^ 8X  Edg   Ve   WS8  d   \	        R4      hRVR	VR
V/V P
                  V&   V P                  P                  V4       W0P                  9   d   V P                  V;;,          V\        W4      V,
          ,          W\        W4      ,           ^,          ,
          ,          ,          uu&   V P                  V;;,          V\        WX4      V,
          ,          ,          uu&   MqV) \        W4      V,
          ,          W\        W4      ,           ^,          ,
          ,          V P                  V&   V\        WX4      V,
          ,          V P                  V&   RV P                  V&   VR8X  Ed   Vf   \        R4      hV P                  P                  RV/4      p
RVRV
RV\        \        V4      4      ,          R
V\!        \        V4      4      ,          RVRV/V P"                  V&   V P$                  P                  V4       V P                  P                  V4       W0P&                  9   d   V P&                  V;;,          V P"                  V,          R,          WpP"                  V,          R,          ,
          ,          ,          uu&   V P(                  V;;,          V P"                  V,          R,          ,          uu&   MsV P"                  V,          R,          WpP"                  V,          R,          ,
          ,          V P&                  V&   V P"                  V,          R,          V P(                  V&   W0P                  9   d}   V P                  V;;,          V P"                  V,          R
,          W,
          ,          ,          uu&   V P                  V;;,          V P"                  V,          R
,          ,          uu&   M\V P"                  V,          R
,          ) W,
          ,          V P                  V&   V P"                  V,          R
,          V P                  V&   RV P                  V&   R# R# )aF  
This method adds load to the Arch.

Parameters
==========

    order : Integer
        Order of the applied load.

            - For point/concentrated loads, order = -1
            - For distributed load, order = 0

    label : String or Symbol
        The label of the load
        - should not use 'A' or 'B' as it is used for supports.

    start : Float

            - For concentrated/point loads, start is the x coordinate
            - For distributed loads, start is the starting position of distributed load

    mag : Sympifyable
        Magnitude of the applied load. Must be positive

    end : Float
        Required for distributed loads

            - For concentrated/point load , end is None(may not be given)
            - For distributed loads, end is the end position of distributed load

    angle: Sympifyable
        The angle in degrees, the load vector makes with the horizontal
        in the counter-clockwise direction.

Examples
========
For applying distributed load

>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,0),crown_x=5,crown_y=5)
>>> a.apply_load(0,'C',start=3,end=5,mag=-10)

For applying point/concentrated_loads

>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,0),crown_x=5,crown_y=5)
>>> a.apply_load(-1,'C',start=2,mag=15,angle=45)

rS   rR   rU   z(load with the given label already existsz1cannot use the given label, reserved for supportsNzprovide end greater than startstartendf_yr   z!please provide direction of forcef_xmagangler   )AB)r   r   r0   rO   rQ   r.   r7   addr9   r   r;   	TypeErrorr'   rN   r   r
   r   r-   r6   r8   r:   )rC   orderlabelrk   ro   rl   rp   rS   rR   rU   heights   &&&&&&&    rG   
apply_loadArch.apply_load   s   d 3K3KD\u~cl'''GHHIPQQA:{ci?@@.5eU3s-SD##E*##E*&u%c!j.>)?CPQJEWYZDZAZ)[[%U#sCJu,<'==#),c!j.>(?CPQJEWYZDZAZ([u%&)3s:e+;&<U#)6D&B;} CDD__))3u+6F'*5#feCCPUJDWY^`cdghklqhrds`suz{~  AH  IN  'ODU###E*##E*&u%)9)9%)@)GK[K[\aKbcfKgIg)hh%U#t'7'7'>u'EE#(,(8(8(?(FJZJZ[`JabeJfHf(gu%&*&6&6u&=e&DU#&u%)9)9%)@)G)RR%U#t'7'7'>u'EE#)-)9)9%)@)G(G(Ru%&*&6&6u&=e&DU#)7D&1 rJ   c           
     p   \        R4      p\        R4      p\        R4      pWP                  9   EdC   V P                  P                  V4       V P                  V,          R,          pV P                  V,          R,          pV P                  V,          R,          pV P                  P                  V4       V P                  V;;,          V\        W64      V,
          ,          ,          uu&   V P                  V;;,          V\        W64      V,
          ,          WE\        W64      ,           ^,          ,
          ,          ,          uu&   V P                  P                  V4      p\        RV RV 24       R# WP                  9   Ed   V P                  P                  V4       V P                  V,          R,          pV P                  P                  V4       V P                  P                  V4       V P                  V;;,          V P                  V,          R,          WE,
          ,          ,          uu&   V P                  V;;,          V P                  V,          R	,          W P                  V,          R,          ,
          ,          ,          uu&   V P                  V;;,          V P                  V,          R	,          ,          uu&   V P                  V;;,          V P                  V,          R,          ,          uu&   V P                  P                  V4      p\        RV RV 24       R# \        R
4      h)a}  
This methods removes the load applied to the arch

Parameters
==========

label : String or Symbol
    The label of the applied load

Examples
========

>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,0),crown_x=5,crown_y=5)
>>> a.apply_load(0,'C',start=3,end=5,mag=-10)
>>> a.remove_load('C')
removed load C: {'start': 3, 'end': 5, 'f_y': -10}
rS   rR   rU   rk   rl   rm   zremoved load : rn   zlabel not foundN)r   r.   r0   popr7   remover;   r   r9   printr-   r6   r8   r:   rO   )	rC   rw   rS   rR   rU   rk   rl   ro   vals	   &&       rG   remove_loadArch.remove_load   s_   & 3K3KD\+++##E*++E27;E))%07C**51%8C&&u-LL3A
5(8#99NN5!S#a*U*:%;RA
ASUV@V=V%WW!))--e4CM%3%01&&&##E*$$U+C0E&&u-&&u-NN5!T%5%5e%<U%CRX%NN!NN5!T%5%5e%<U%CQGWGWX]G^_bGcEc%dd!LL4#3#3E#:5#AALL4#3#3E#:5#AA""&&u-CM%3%01 .//rJ   c                    Ve   V^ ,          V^,          3V n         Ve   V^ ,          V^,          3V n        RV n        V P                  V n        R# )a  
Change position of supports.
If not provided , defaults to the old value.
Parameters
==========

    left_support: tuple (x, y)
        x: float
            x-coordinate value of the left_support

        y: float
            y-coordinate value of the left_support

    right_support: tuple (x, y)
        x: float
            x-coordinate value of the right_support

        y: float
            y-coordinate value of the right_support
N)r(   r)   r'   r,   )rC   rD   rE   s   &&&rG   change_support_positionArch.change_support_position+  sP    * #".q/,q/!BD$#0#3M!4D"ED,,rJ   c                N    Wn         W n        RV n        V P                  V n        R# )a;  
Change the position of the crown/hinge of the arch

Parameters
==========

    crown_x: Float
        The x coordinate of the position of the hinge
        - if not provided, defaults to old value

    crown_y: Float
        The y coordinate of the position of the hinge
        - if not provided defaults to None
N)r*   r+   r'   r,   )rC   r   r   s   &&&rG   change_crown_positionArch.change_crown_positionI  s"      ,,rJ   c                    RR.pV'       d    W9  d   \        R4      hWP                  R&   V'       d"   W#9  d   \        R4      hW P                  R&   R# R# )ab  
Add the type for support at each end.
Can use roller or hinge support at each end.

Parameters
==========

    left_support, right_support : string
        Type of support at respective end

            - For roller support , left_support/right_support = "roller"
            - For hinged support, left_support/right_support = "hinge"
            - defaults to hinge if value not provided

Examples
========

For applying roller support at right end

>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,0),crown_x=5,crown_y=5)
>>> a.change_support_type(right_support="roller")

rollerr   z%supports must only be roller or hinger   r    N)rO   r1   )rC   rD   rE   support_typess   &&& rG   change_support_typeArch.change_support_type]  sU    2 "'*0 !HII%1NN6"1 !HII&3NN7#	 rJ   c                L   WP                   8  g4   V\        V P                  ^,          V P                  ^,          4      8  dH   \	        R\        V P                  ^,          V P                  ^,          4       RV P                    24      h\        R4      p\        V P                  V4      P                  W P                  ^,           4      ^,          p\        WP                   ,
          V,          4      pV P                  V,           pV P                  V,
          pWVV3V n        R# )z
This method adds a member/rod at a particular height y.
A rod is used for stability of the structure in case of a roller support.
z&position of support must be between y=z and y=rR   N)r+   minr(   r)   rO   r   r   r'   rN   r*   r   r2   )rC   rS   rR   rL   x_diffx1x2s   &&     rG   
add_memberArch.add_member  s    
 ]]?aD$6$6q$9D<O<OPQ<R SSEc$J\J\]^J_bfbubuvwbxFyEz  {B  CG  CP  CP  BQ  R  S  S3K#((==?;A=q==(!+,]]V#]]V#ayrJ   c                    Vf   V P                   # \        R4      pRV9   d"   VR,          p\        V P                   W1VR7      # V P                   P                  W14      # )zT
return the shear at some x-coordinates
if no x value provided, returns the formula
rR   dirr   )rA   r   r   rN   rC   posrF   rR   r   s   &&,  rG   shear_force_atArch.shear_force_at  Z    
 ;$$$sAUmT..q==$$))!00rJ   c                    Vf   V P                   # \        R4      pRV9   d"   VR,          p\        V P                   W1VR7      # V P                   P                  W14      # )z]
return the bending moment at some x-coordinates
if no x value provided, returns the formula
rU   r   r   )r@   r   r   rN   )rC   r   rF   rU   r   s   &&,  rG   bending_moment_atArch.bending_moment_at  sZ    
 ;'''BUmT11"SAA'',,R44rJ   c                    Vf   V P                   # \        R4      pRV9   d"   VR,          p\        V P                   W1VR7      # V P                   P                  W14      # )zj
return the axial/normal force generated at some x-coordinate
if no x value provided, returns the formula
rR   r   r   )rB   r   r   rN   r   s   &&,  rG   axial_force_atArch.axial_force_at  r   rJ   c                '   \        R4      p\        R4      p\        R4      p\        V P                  4      p\        V P                  4      p\	        R4      V n        \	        R4      V n        \	        R4      V n        \	        R4      V n        ^ p^ p^ p^ p	V Fu  p
W*8  pWP                  V
,          ,          pW`P                  V
,          ,          p\	        W3V P                  R34      V n        \	        Wk3V P
                  R34      V n        Kw  	  V Fu  p
W*8  pWpP                  V
,          ,          pWP                  V
,          ,          p	\	        W3V P                  R34      V n        \	        W{3V P                  R34      V n        Kw  	  V P                  P                  W P                  ^ ,          4      P                  W0P                  ^ ,          4      V P
                  P                  W P                  ^ ,          4      P                  WP                  ^,          4      ,           pV P                  P                  W P                   4      P                  W0P                   4      V P
                  P                  W P                   4      P                  WP"                  4      ,           pV P                  P                  W P                  ^ ,          4      P                  W0P                   4      V P                  P                  W P                   4      P                  W0P                   4      ,
          V P
                  P                  W P                  ^ ,          4      P                  WP"                  4      ,           V P
                  P                  W P                   4      P                  WP"                  4      ,
          pV P                  P                  W P                  ^ ,          4      pV P                  P                  W P                  ^ ,          4      pV P$                  R,          R8X  g   V P$                  R,          R8X  d    V P&                  '       g   \)        R4       R	# \+        R
4      w  pppppV P$                  R,          R8X  Ed   V P$                  R,          R8X  Ed   V P&                  ^,          \-        V P                  ^,          V P                  ^,          4      8  EdC   V^ 8w  d   \/        R4      h\1        V^ 4      p\1        V^ 4      p\1        VV,           V,           ^ 4      p\1        VV P                  ^ ,          V P                  ^ ,          ,
          ,          VV P                  ^,          V P                  ^,          ,
          ,          ,
          V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           VV P&                  ^,          V P"                  ,
          ,          ,           ^ 4      p\3        VVVVV3VVVVV34      pEMV P&                  ^,          V P                  ^,          8  d   \1        V^ 4      p\1        V^ 4      p\1        VV,           V,           ^ 4      p\1        VV P                  ^ ,          V P                  ^ ,          ,
          ,          VV P&                  ^,          V P                  ^,          ,
          ,          ,
          V,           ^ 4      p\1        VV,           ^ 4      p\3        VVVVV3VVVVV34      pE
MV P&                  ^,          V P                  ^,          8  d   \1        V^ 4      p\1        V^ 4      p\1        VV,           V,           ^ 4      p\1        VV P                  ^ ,          V P                  ^ ,          ,
          ,          VV P&                  ^,          V P                  ^,          ,
          ,          ,           V,           ^ 4      p\1        VV,
          ^ 4      p\3        VVVVV3VVVVV34      pE	MV P$                  R,          R8X  Ed   V P&                  ^,          \-        V P                  ^,          V P                  ^,          4      8  Ed8   \1        V^ 4      p\1        VV,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VV P                  ^ ,          V P                  ^ ,          ,
          ,          VV P                  ^,          V P                  ^,          ,
          ,          ,
          V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           VV P&                  ^,          V P"                  ,
          ,          ,
          ^ 4      p\3        VVVVV3VVVVV34      pEM9V P&                  ^,          V P                  ^,          8  Edv   \1        V^ 4      p\1        VV,           V,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VV P                  ^ ,          V P                  ^ ,          ,
          ,          VV P                  ^,          V P                  ^,          ,
          ,          ,
          VV P&                  ^,          V P                  ^ ,          ,
          ,          ,
          V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           VV P&                  ^,          V P"                  ,
          ,          ,
          ^ 4      p\3        VVVVV3VVVVV34      pEMV P&                  ^,          V P                  ^ ,          8  EdD   \1        V^ 4      p\1        VV,
          V,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           ^ 4      p\1        VVV P                  ^ ,          V P                  ^ ,          ,
          ,          ,           VV P                  ^,          V P                  ^,          ,
          ,          ,
          VV P&                  ^,          V P                  ^,          ,
          ,          ,           ^ 4      p\3        VVVVV3VVVVV34      pEM+V P$                  R,          R8X  Ed   V P&                  ^,          \-        V P                  ^,          V P                  ^,          4      8  Ed   \1        V^ 4      p\1        VV,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           VV P&                  ^,          V P"                  ,
          ,          ,           ^ 4      p\1        VVV P                  ^ ,          V P                  ^ ,          ,
          ,          ,           ^ 4      p\3        VVVVV3VVVVV34      pEMV P&                  ^,          V P                  ^,          8  Ed   \1        V^ 4      p\1        VV,           V,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           ^ 4      p\1        VVV P&                  ^,          V P                  ^,          ,
          ,          ,
          VV P                  ^ ,          V P                  ^ ,          ,
          ,          ,           ^ 4      p\3        VVVVV3VVVVV34      pEMV P&                  ^,          V P                  ^,          8  Ed<   \1        V^ 4      p\1        VV,
          V,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           VV P&                  ^,          V P"                  ,
          ,          ,           ^ 4      p\1        VVV P&                  ^,          V P                  ^,          ,
          ,          ,           VV P                  ^ ,          V P                  ^ ,          ,
          ,          ,           4      p\3        VVVVV3VVVVV34      pEM.\1        VV,           V,           ^ 4      p\1        VV,           V,           ^ 4      p\1        VV P                  ^ ,          V P                  ^ ,          ,
          ,          VV P                  ^,          V P                  ^,          ,
          ,          ,
          V,           ^ 4      p\1        VVV P                  ^ ,          V P                   ,
          ,          ,           VV P                  ^,          V P"                  ,
          ,          ,
          ^ 4      p\3        VVVV3VVVV34      pV P4                   F  pXV,          V P4                  V&   K  	  V P
                  P                  W#4      V P                  P                  W#4      ,           XV,          W0P                  ^ ,          ,
          ,          ,
          VV,          V P6                  P                  W#/4      V P                  ^,          ,
          ,          ,           ) V n        \;        \=        V P6                  V4      4      pV P                  VV,          ,           pV P                  VV,          ,           pV\?        V4      ,          V\A        V4      ,          ,           p V) \A        V4      ,          V\?        V4      ,          ,           p!V V n!        V!V n"        R	# )a  
This method solves for the reaction forces generated at the supports,

and bending moment and generated in the arch and tension produced in the member if used.

Examples
========

>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(10,0),crown_x=5,crown_y=5)
>>> a.apply_load(0,'C',start=3,end=5,mag=-10)
>>> a.solve()
>>> a.reaction_force
{R_A_x: 8, R_A_y: 12, R_B_x: -8, R_B_y: 8}

>>> from sympy import Symbol
>>> t = Symbol('t')
>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(16,0),crown_x=8,crown_y=5)
>>> a.apply_load(0,'C',start=3,end=5,mag=t)
>>> a.solve()
>>> a.reaction_force
{R_A_x: -4*t/5, R_A_y: -3*t/2, R_B_x: 4*t/5, R_B_y: -t/2}

>>> a.bending_moment_at(4)
-5*t/2
rS   rR   rU   Tr   r   r    z5member must be added if any of the supports is rollerNzR_A_x R_A_y R_B_x R_B_y TzDnet force in x direction not possible under the specified conditionsr%   )#r   sortedr6   r7   r   r<   r=   r>   r?   r:   r8   r9   r;   rN   r)   r(   r*   r+   r1   r2   r   r   maxrO   r   r   r4   r'   r@   r	   r   r   r   rB   rA   )"rC   rS   rR   rU   discontinuity_points_xdiscontinuity_points_yaccumulated_x_momentaccumulated_y_momentaccumulated_x_loadaccumulated_y_loadpointcondmoment_Amoment_hinge_leftmoment_hinge_rightnet_xnet_yr!   r"   r#   r$   TrX   rZ   eq3eq4eq5rY   symbrp   fxfyaxial_forceshear_forces"   &                                 rG   r   
Arch.solve  s   6 3K3KD\!'(;(;!<!'(;(;!<'1'1%h/%h/  +EJD,,u"55 NN5$99  )+=*CTEVEVW[D\ ]D"+-A,GI\I\]aHb"cD , ,EJD NN5$99 ,,u"55 )+=*CTEVEVW[D\ ]D"+-A,GI\I\]aHb"cD , &&++A.A.A!.DEJJ2N`N`abNcd&&++A.A.A!.DEJJ1M_M_`aMbcd !//44Q}}EJJ2mm\ //44Q}}EJJ1]][\ "0055a8K8KA8NOTTUWXeXef!0055aFKKB}}]^!0055a8K8KA8NOTTUVWdWdef "0055aFKKAmm\]
 !!&&q)<)<Q)?@!!&&q)<)<Q)?@NN6"H,w0G0Q[_[g[g[gIJ(/0K(L%ueUA>>&!X-$..2IX2U||AD$6$6q$9$:M:Ma:P QQ!8$%kll UA,CUA,CUU]U215CUD$7$7$:4;M;Ma;P$PQ"D$7$7$:4;M;Ma;P$PQRRZ[[\^C /%9L9LQ9OPTP]P]9]2^^Q =>??@BC$c#c#c%:E%eTU;VWHa$"4"4Q"77ll.q1 3 3A 6t7I7I!7L LMDLLOD,>,>q,AABCCKLLMO5m #c#c#!6eE%PQ7RSa$"5"5a"88ll.q1 3 3A 6t7I7I!7L LMDLLOD,>,>q,AABCCKLLMO5m #c#c#!6eE%PQ7RS^^F#x/||AD$6$6q$94;N;Nq;Q RRluQ'.q1 3 3A 6t7I7I!7L LM 3 3A 6t7I7I!7L LMNNVWWXZ*UD4F4Fq4I$--4W-XXDLLODMM9:;;<> #c#c#!6eE%PQ7RSa$"4"4Q"77l5+.q1 3 3A 6t7I7I!7L LM 3 3A 6t7I7I!7L LMNDLLOD,>,>q,AABCCKLLMO *UD4F4Fq4I$--4W-XXDLLODMM9:;;<> #c#c#!6eE%PQ7RSa$"5"5a"88qk5+.q1*5$2D2DQ2G2U+VVWXY%)<)<Q)?@R@RST@U)U"VV 3 3A 6t7I7I!7L LMNDLLOD,>,>q,AABCCDF !#c#c#!6eE%PQ7RS^^G$0||AD$6$6q$94;N;Nq;Q RRqkuQ'uU*1-+E43F3Fq3I$--3W,XXDLLODMM9:;;<>%)<)<Q)?@R@RST@U)U"VVWXY #c#c#!6eE%PQ7RSa$"4"4Q"77qkqq)uU*1-+E43F3Fq3I$--3W,XXYZ[!T\\!_T5G5G5J%J"KK 3 3A 6t7I7I!7L LMNNOQ #c#c#!6eE%PQ7RSa$"5"5a"88qkqq)uU*1-+E43F3Fq3I$--3W,XXDLLODMM9:;;<>!T\\!_T5G5G5J%J"KK 3 3A 6t7I7I!7L LMN O #c#c#!6eE%PQ7RSUU]U*1-CUU]U*1-CUD//243E3Ea3HHID//243E3Ea3HHIJJRSSTVC'%1D1DQ1G1U*VVD//24==@ABBCECc#c#.eE%/HIH((D)1$D  & ) #'"5"5":":1"@4CVCVC[C[\]Ca"a"*5/26H6H6K3K"L#M"*5/4??3G3G3OPTPbPbcdPe3e"f#g  h d4??1-.//UmbUm3c#e*nr#e*}4''rJ   )modulesc                   \        R4      p. pV P                  4       p. pV P                  4       pW%,          pV P                  ^ ,          pV P                  ^ ,          p\        V P                  ^,          V P                  ^,          4      pV P                  p	\        VR,          VR,          ,
          ^,           V	R,          VR,          ,
          ^,           4      p
V P                  4       pV P                  4       pWK,          pV P                  e   V P                  ^,          V P                  ^,          8  dP   VP                  RV P                  ^,          RV
,          ,           .V P                  ^,          ..RRR^R	R
RR/4       V P                  ^,          V P                  ^,          8  dP   VP                  RV P                  ^ ,          RV
,          ,
          .V P                  ^,          ..RRR^R	R
RR/4       VP                  RV P                  .V P                  RV
,          ,
          ..RRR^R	R
RR/4       WR,          VR,          ,
          ^,           8X  d   \        V P                  RV
,          ,
          V P                  WP                  ^ ,          V P                  ^ ,          3VRVVVRV
,          ,
          VR,          3VRV
,          ,
          VR,          3RRR7      pV# \        V P                  RV
,          ,
          V P                  WP                  ^ ,          V P                  ^ ,          3VRVVVRV
,          ,
          V	R,          3VRV
,          ,
          V	R,          3RRR7      pV# )a  
This method returns a plot object containing the diagram of the specified arch along with the supports
and forces applied to the structure.

Examples
========

>>> from sympy import Symbol
>>> t = Symbol('t')
>>> from sympy.physics.continuum_mechanics.arch import Arch
>>> a = Arch((0,0),(40,0),crown_x=20,crown_y=12)
>>> a.apply_load(-1,'C',8,150,angle=270)
>>> a.apply_load(0,'D',start=20,end=40,mag=-4)
>>> a.apply_load(-1,'E',10,t,angle=300)
>>> p = a.draw()
>>> p # doctest: +ELLIPSIS
Plot object containing:
[0]: cartesian line: 11.325 - 3*(x - 20)**2/100 for x over (0.0, 40.0)
[1]: cartesian line: 12 - 3*(x - 20)**2/100 for x over (0.0, 40.0)
...
>>> p.show()

rR   皙?皙?args{Gzt?markero
markersizecolorwhitemarkerfacecolornoneQ?F皙?brown)markersshowannotations
rectanglesxlimylimaxis
line_color)r   _draw_loads_draw_supportsr)   r(   r   r+   r   _draw_rectangles_draw_fillerr2   appendr*   r   r'   )rC   rR   r   r   r   ra   xmaxxminyminymaxlimfiller	sing_plots   &            rG   draw	Arch.draw  s   2 3K&&(
&&(""1%!!!$4%%a()<)<Q)?@}}$s(48#A%tCxS'8':;**,
""$
<<#||A 3 3A 66as!: ;T\\!_<MN $a)& ||A 2 21 55as!: ;T\\!_<MN $a)& 	T]]OT]]59%<$=>S!Gf
 	 Sc!!##T__U3Y6!__!3!3A!68K8KA8NO%,"')4*4#'S=$s(";#'S=$s(";"'(/
1I2  T__U3Y6!__!3!3A!68K8KA8NO%,"')4*4#'S=$s(";#'S=$s(";"'(/
1I rJ   c                   . pV P                   ^ ,          pV P                  ^ ,          p\        V P                  ^,          V P                   ^,          4      pV P                  p\	        RV,          RV,          ,
          4      \	        RV,          RV,          ,
          4      8  d   RV,          RV,          ,
          pMRV,          RV,          ,
          pV P
                  R,          R8X  dQ   VP                  RV P                  ^ ,          .V P                  ^,          RV,          ,
          ..RRR	^R
RRR/4       MOVP                  RV P                  ^ ,          .V P                  ^,          RV,          ,
          ..R^R	^R
RRR/4       V P
                  R,          R8X  dQ   VP                  RV P                   ^ ,          .V P                   ^,          RV,          ,
          ..RRR	^R
RRR/4       MOVP                  RV P                   ^ ,          .V P                   ^,          RV,          ,
          ..R^R	^R
RRR/4       VP                  RV P                   ^ ,          .V P                   ^,          RV,          ,
          ..RRR	^R
RRR/4       VP                  RV P                  ^ ,          .V P                  ^,          RV,          ,
          ..RRR	^R
RRR/4       V# )r&   r   r   r   r   r   g{Gz?r   r   r   r   blackr   r   gy&1|?r    g;On?_)r)   r(   r   r+   absr1   r   )rC   support_markersr   r   r   r   max_diffs   &      rG   r   Arch._draw_supports  s   ""1%!!!$4%%a()<)<Q)?@}}s4xD !#c$hs4x&7"884xD(H4xD(H>>&!8+""++A./++A.tH}<= S G%f	 ""++A./++A.uX~=> Q G%f	 >>'"H,"",,Q/0,,Q/X=> S G%f	 "",,Q/0,,Q/h>? Q G%f	 	((+,((+E(N:; R!&		
 	''*+''*5>9: R!&		
 rJ   c                   . pV P                   ^ ,          pV P                  ^ ,          p\        V P                  ^,          V P                   ^,          4      pV P                  p\	        RV,          RV,          ,
          4      \	        RV,          RV,          ,
          4      8  d   RV,          RV,          ,
          pMRV,          RV,          ,
          pV P
                  Ee   V P
                  ^,          \        V P                  ^,          V P                   ^,          4      8  d   VP                  RV P
                  ^ ,          V P
                  ^,          RV,          ,
          3RV P
                  ^,          V P
                  ^ ,          ,
          RRV,          R^ R	R
/4       EM-V P
                  ^,          V P                  ^,          8  d   VP                  RV P
                  ^ ,          V P
                  ^,          RV,          ,
          3RV P                   ^ ,          V P
                  ^ ,          ,
          RRV,          R^ R	R
/4       MVP                  RV P
                  ^,          V P
                  ^,          RV,          ,
          3R\	        V P                  ^ ,          V P
                  ^,          ,
          4      RRV,          R^R	R
/4       V P                  '       d   V P                   Fv  pV P                  V,          R,          pV P                  V,          R,          p	VP                  RWP                  VR,          ,           3RW,
          RVR,          R	R/4       Kx  	  V# )r&   r   r   xyr   widthrx   g{Gz?rp   r   r   rk   rl   333333?orange)	r)   r(   r   r+   r   r2   r   r   r.   )
rC   memberr   r   r   r   r   loadsrk   rl   s
   &         rG   r   Arch._draw_rectanglesR  s   ""1%!!!$4%%a()<)<Q)?@}}s4xD !#c$hs4x&7"884xD(H4xD(H<<#||AT%7%7%:4;N;Nq;Q!RRdll1odll1oeHn.LMQQ ? $x- a$"4"4Q"77dll1odll1oeHn.LM 3 3A 6t||A F $x- dll1odll1oeHn.LMD$6$6q$9$,,q/$I J $x- """00//6w?--e4U;eMM(4-$?@#) (4-	 1 rJ   c                   . pV P                   ^ ,          pV P                  ^ ,          p\        V P                  ^,          V P                   ^,          4      pV P                  p\	        RV,          RV,          ,
          4      \	        RV,          RV,          ,
          4      8  d   RV,          RV,          ,
          pMRV,          RV,          ,
          pV P
                   EFS  pV P
                  V,          R,          pV P
                  V,          R,          p	V P
                  V,          R,          p
V P
                  V,          R,          pVP                  RRR	V\        \        V
4      4      V,          R
,          ,           V	\        \        V
4      4      V,          R
,          ,           3RW3R^
RRRRRR^R^RRRR//4       VP                  RV RV R2R^
RRR	V\        \        V
4      4      V,          R,          ,           V	\        \        V
4      4      V,          R,          ,           3/4       EKV  	  V P                   EF  pV P                  V,          R,          pV P                  V,          R,          pV P                  V,          R,          p\        P                  WW,
          VR,          ,          4      p\        P                  W4      pV F  pV^ 8  dX   VP                  RRR	WP                  VR,          ,           3RWP                  VR,          ,           3RRRR^R^RR RR //4       Ka  VP                  RRR	WP                  VR!,          ,           3RWP                  VR,          ,           3RRRR^R^RR RR //4       K  	  V^ 8  dS   VP                  RV R\	        V4       R"2R^
RRR	W,           ^,          V P                  VR#,          ,           3/4       EK  VP                  RV R\	        V4       R"2R^
RRR	W,           ^,          V P                  VR$,          ,           3/4       EK  	  V# )%r&   r   r   rR   rS   rp   ro   text r   g{Gz?xytextfontsize
fontweightbold
arrowpropsr   g      ?
headlength	headwidth	facecolorblue	edgecolorr|   z NgQ?rk   rl   rm   g      ?r   r   r   g?z N/mgffffff?g      ?)r)   r(   r   r+   r   r-   r   r   r
   r   r.   r   r   )rC   load_annotationsr   r   r   r   r   loadrR   rS   rp   ro   rk   rl   x_pointsr   s   &               rG   r   Arch._draw_loads  s   ""1%!!!$4%%a()<)<Q)?@}}s4xD !#c$hs4x&7"884xD(H4xD(H$$D  &s+A  &s+A$$T*73E""4(/C##2#c%j/(2477#c%j/(2477 aUr & '#|A{1kZ`alms!t
 ##dV2cU"-r &1SU_X5d::1SU_X=UVZ=Z;Z[	% %6 ++D++D1':E))$/6C))$/6C||Esy8D=.IJH||H1H!q5$++"2 %htm(C!D$u]]8D=-H&I('#|A{STVabjkvw  *A	 %++"2 %hsl(B!C$u]]8D=-H&I('#|A{STVabjkvw  *A	 "& 1u ''$r#c(48"2$fuy!mDMM(5.,HI	 !''$r#c(48"2$fuy!mDMM(5.,HI	G ,V  rJ   c                   \        R 4      p. pV P                  ^ ,          pV P                  ^ ,          p\        V P                  ^,          V P                  ^,          4      pV P                  p\        RV,          RV,          ,
          4      \        RV,          RV,          ,
          4      8  d   RV,          RV,          ,
          pMRV,          RV,          ,
          p\        P                  V P                  ^ ,          V P                  ^ ,          V P                  ^ ,          V P                  ^ ,          ,
          Ww,          ,          4      pV F  p	VP                  RWP                  P                  W4      VR,          ,
          3RV P                  ^ ,          V P                  ^ ,          ,
          Ww,          ,          RVR,          RR/4       K  	  V# )	rR   r   r   r   r   r   rx   r   r   )r   r)   r(   r   r+   r   r   r   r   r'   rN   )
rC   rR   r   r   r   r   r   r   r  r   s
   &         rG   r   Arch._draw_filler  s   3K""1%!!!$4%%a()<)<Q)?@}}s4xD !#c$hs4x&7"884xD(H4xD(H<< 2 21 5d6I6I!6LdNaNabcNdeiewewxyezNz  ~F  ~O  NP  QEMMeOO$8$8$A(5.$PQ$"5"5a"89K9KA9N"NQYQb!c (5.	  rJ   )rB   r@   r-   r*   r+   r.   r(   r:   r>   r;   r?   r/   r0   r2   r3   r8   r<   r9   r=   r6   r7   r4   r)   r'   rA   r1   )NN)N)r   )__name__
__module____qualname____firstlineno____doc__rH   propertyr,   r^   ra   rD   rE   rh   ry   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @rG   r   r      s     (!D  B     " " # # $ $h8V10f-<-($4L!151J(X 
+g ,gT]~?BS j rJ   r   N)r	  sympy.core.sympifyr   sympy.core.symbolr   r   sympyr   r   r   r   r	   r
   r   sympy.core.relationalr   sympy.solvers.solversr   sympy.functionsr   sympy.plottingr   r   sympy.utilities.decoratorr   sympy.external.importtoolsr   r   r    rJ   rG   <module>r     sO    ' , 7 7 7 $ ' %   8 4gj(-DEp prJ   