+
    LV-j«!  ã                   óf   € R .t ^ RIt^ RIHt ^ RIt^ RIHt ]'       d   ^ RIHt	 R t
RR R lltR# )Úgeometric_slerpN)ÚTYPE_CHECKING)Ú	euclideanc                 ó8  € \         P                  ! W.4      p\         P                  P                  VP                  4      w  rE^\         P
                  ! V4      ^ 8¬  ,          ^,
          pVP                  VP                  R\         P                  3,          ,          pVP                  VP                  R\         P                  3,          ,          p\         P                  ! W4      p\         P                  P                  V4      p\         P                  ! W‡4      p	Vw  r\         P                  ! W),          4      p\         P                  ! W),          4      pWR\         P                  3,          ,          WR\         P                  3,          ,          ,           # )é   :NNN)ÚnpÚvstackÚlinalgÚqrÚTÚdiagÚnewaxisÚdotÚdetÚarctan2ÚsinÚcos)
ÚstartÚendÚtÚbasisÚQÚRÚsignsÚcÚsÚomegas
   &&&       Úo/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/scipy/spatial/_geometric_slerp.pyÚ_geometric_slerpr      s  € ä�IŠI�u�lÓ#€EÜ�9‰9�<‰<˜Ÿ™Ó �D€AØ”—’˜“˜q‘Õ! AÕ%€EØ	�‰ˆe�g‰g�aœŸ™�mÕ$Õ$€AØ	�‰ˆe�g‰g�aœŸ™�mÕ$Õ$€Aô 	�ŠˆuÓ€AÜ
�	‰	�‰�aÓ€AÜ�JŠJ�qÓ€Eð �J€EÜ
�Šˆq�yÓ€AÜ
�Šˆq�yÓ€AØ�QœŸ
™
�]Õ#Õ# c¨a´·±¨mÕ,<Õ&<Õ<Ð<ó    c          
      óP   € V ^8„  d   QhRRRRRRR\         R\        P                  /# )r   r   znpt.ArrayLiker   r   ÚtolÚreturn)Úfloatr   Úndarray)Úformats   "r   Ú__annotate__r&   !   sE   € ÷ _#ñ _#Øð_#à	ð_#ð ð_#ô 
ð	_#ô
 ‡Z�Zñ_#r   c                ó\  € \         P                  ! V \         P                  R7      p \         P                  ! V\         P                  R7      p\         P                  ! V4      pVP                  ^8”  d   \	        R4      hV P                  ^8w  g   VP                  ^8w  d   \	        R4      hV P
                  VP
                  8w  d   \	        R4      hV P
                  ^8  g   VP
                  ^8  d   \	        R4      h\         P                  ! W4      '       d"   \         P                  ! W VP
                  4      # W3 FK  p\         P                  ! \         P                  P                  V4      RR^ R7      '       d   KB  \	        R	4      h	  \        V\        4      '       g   \	        R
4      h\         P                  ! V4      p\        W4      p\         P                  ! VR^ VR7      '       d   \        P                   ! R^R7       \         P                  ! V\         P                  R7      pVP
                  ^ 8X  d#   \         P"                  ! ^ V P
                  34      # VP                  ^ 8X  d0   \%        V V\         P&                  ! V4      4      P)                  4       # \%        V VV4      # )aÓ  
Geometric spherical linear interpolation.

The interpolation occurs along a unit-radius
great circle arc in arbitrary dimensional space.

Parameters
----------
start : (n_dimensions, ) array-like
    Single n-dimensional input coordinate in a 1-D array-like
    object. `n` must be greater than 1.
end : (n_dimensions, ) array-like
    Single n-dimensional input coordinate in a 1-D array-like
    object. `n` must be greater than 1.
t : float or (n_points,) 1D array-like
    A float or 1D array-like of doubles representing interpolation
    parameters. A common approach is to generate the array
    with ``np.linspace(0, 1, n_pts)`` for linearly spaced points.
    Ascending, descending, and scrambled orders are permitted.

    .. versionchanged:: 1.17.0
        Extrapolation is permitted, allowing values below `0`
        and above `1`.
tol : float
    The absolute tolerance for determining if the start and end
    coordinates are antipodes.

Returns
-------
result : (t.size, D)
    An array of doubles containing the interpolated
    spherical path and including start and
    end when 0 and 1 t are used. The
    interpolated values should correspond to the
    same sort order provided in the t array. The result
    may be 1-dimensional if ``t`` is a float.

Raises
------
ValueError
    If ``start`` or ``end`` are not on the
    unit n-sphere, or for a variety of degenerate conditions.

See Also
--------
scipy.spatial.transform.Slerp : 3-D Slerp that works with quaternions

Notes
-----
The implementation is based on the mathematical formula provided in [1]_,
and the first known presentation of this algorithm, derived from study of
4-D geometry, is credited to Glenn Davis in a footnote of the original
quaternion Slerp publication by Ken Shoemake [2]_.

.. versionadded:: 1.5.0

References
----------
.. [1] https://en.wikipedia.org/wiki/Slerp#Geometric_Slerp
.. [2] Ken Shoemake (1985) Animating rotation with quaternion curves.
       ACM SIGGRAPH Computer Graphics, 19(3): 245-254.

Examples
--------
Interpolate four linearly-spaced values on the circumference of
a circle spanning 90 degrees:

>>> import numpy as np
>>> from scipy.spatial import geometric_slerp
>>> import matplotlib.pyplot as plt
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111)
>>> start = np.array([1, 0])
>>> end = np.array([0, 1])
>>> t_vals = np.linspace(0, 1, 4)
>>> result = geometric_slerp(start,
...                          end,
...                          t_vals)

The interpolated results should be at 30 degree intervals
recognizable on the unit circle:

>>> ax.scatter(result[...,0], result[...,1], c='k')
>>> circle = plt.Circle((0, 0), 1, color='grey')
>>> ax.add_artist(circle)
>>> ax.set_aspect('equal')
>>> plt.show()

Attempting to interpolate between antipodes on a circle is
ambiguous because there are two possible paths, and on a
sphere there are infinite possible paths on the geodesic surface.
Nonetheless, one of the ambiguous paths is returned along
with a warning:

>>> import warnings
>>> opposite_pole = np.array([-1, 0])
>>> with warnings.catch_warnings():
...     warnings.simplefilter("ignore", UserWarning)
...     geometric_slerp(start,
...                     opposite_pole,
...                     t_vals)
array([[ 1.00000000e+00,  0.00000000e+00],
       [ 5.00000000e-01,  8.66025404e-01],
       [-5.00000000e-01,  8.66025404e-01],
       [-1.00000000e+00,  1.22464680e-16]])

Extend the original example to a sphere and plot interpolation
points in 3D:

>>> from mpl_toolkits.mplot3d import proj3d
>>> fig = plt.figure()
>>> ax = fig.add_subplot(111, projection='3d')

Plot the unit sphere for reference (optional):

>>> u = np.linspace(0, 2 * np.pi, 100)
>>> v = np.linspace(0, np.pi, 100)
>>> x = np.outer(np.cos(u), np.sin(v))
>>> y = np.outer(np.sin(u), np.sin(v))
>>> z = np.outer(np.ones(np.size(u)), np.cos(v))
>>> ax.plot_surface(x, y, z, color='y', alpha=0.1)

Interpolating over a larger number of points
may provide the appearance of a smooth curve on
the surface of the sphere, which is also useful
for discretized integration calculations on a
sphere surface:

>>> start = np.array([1, 0, 0])
>>> end = np.array([0, 0, 1])
>>> t_vals = np.linspace(0, 1, 200)
>>> result = geometric_slerp(start,
...                          end,
...                          t_vals)
>>> ax.plot(result[...,0],
...         result[...,1],
...         result[...,2],
...         c='k')
>>> plt.show()

It is also possible to perform extrapolations outside
the interpolation interval by using interpolation parameter
values below 0 or above 1. For example, the above example
may be adjusted to extrapolate to an antipodal position:

>>> fig = plt.figure()
>>> ax = fig.add_subplot(111, projection='3d')
>>> ax.plot_surface(x, y, z, color='y', alpha=0.1)
>>> start = np.array([1, 0, 0])
>>> end = np.array([0, 0, 1])
>>> t_vals = np.linspace(0, 2, 400)
>>> result = geometric_slerp(start,
...                          end,
...                          t_vals)
>>> ax.plot(result[...,0], result[...,1], result[...,2], c='k')
>>> plt.show()
)Údtypez:The interpolation parameter value must be one dimensional.z1Start and end coordinates must be one-dimensionalz;The dimensions of start and end must match (have same size)zLThe start and end coordinates must both be in at least two-dimensional spaceg      ð?g•Ö&è.>)ÚrtolÚatolz(start and end are not on a unit n-sphereztol must be a floatg       @z_start and end are antipodes using the specified tolerance; this may cause ambiguous slerp paths)Ú
stacklevel)r   ÚasarrayÚfloat64ÚndimÚ
ValueErrorÚsizeÚarray_equalÚlinspaceÚallcloser	   ÚnormÚ
isinstancer#   Úfabsr   ÚwarningsÚwarnÚemptyr   Ú
atleast_1dÚravel)r   r   r   r!   ÚcoordÚ
coord_dists   &&&&  r   r   r   !   s  € ôH �JŠJ�u¤B§J¡JÔ/€EÜ
�*Š*�S¤§
¡
Ô
+€CÜ
�
Š
�1‹€Aà‡v�v�„zÜð :ó ;ð 	;ð ‡z�z�Q„˜#Ÿ(™( aœ-Üð 3ó 4ð 	4ð ‡z�z�S—X‘XÔÜð ;ó <ð 	<ð ‡z�z�A„~˜Ÿ™ AœÜð !ó "ð 	"ô 
‡~‚~�e×!Ò!Ü�{Š{˜5¨¯©Ó0Ð0ð “ˆÜ�{Š{œ2Ÿ9™9Ÿ>™>¨%Ó0°#Ø $Ø !÷#õ #ô ð 3ó 4ð 4ñ	 ô �cœ5×!Ò!ÜÐ.Ó/Ð/ä�gŠg�c‹lˆä˜5Ó&€Jô 
‡{‚{�:˜s¨°×5Ó5Ü�Šð =ð "#õ	$ô
 	�
Š
�1œBŸJ™JÔ'€Aà‡v�v�„{Ü�xŠx˜˜EŸJ™J˜Ó(Ð(à‡v�v�„{Ü Ø #Ü "§¢¨aÓ 0ó2ç27±%³'ð	:ô   Ø #Ø !ó#ð 	#r   )gH¯¼šò×z>)Ú__all__r7   Útypingr   Únumpyr   Úscipy.spatial.distancer   Únumpy.typingÚnptr   r   © r   r   Ú<module>rE      s0   ðØÐ
€ã Ý  ã Ý ,çÝò=÷(_#ñ _#r   