ó
    Å“,jB  ã                   ó(   • S SK rS SKJr  SS jrS rg)é    N)Úelliprgc           	      ó¤  • U S::  d  US::  d  US::  a  [        S5      e[        R                  S   [        R                  U   -  n[        R                  " [        R                  XU4   * U-
  5      n[        R                  " [        R                  XU4   U-   S-   5      n[        S5       Hj  nXx   Xh   -
  S-  S:X  a  Xh==   S-  ss'   [        R                  " Xh   Xx   X8   5      n	SU	;  d  ME  Xh==   [        R                  " X™S:     5      -  ss'   Ml     [        R                  US   US   US   2US   US   US   2US   US   US   24   u  p«nU(       d:  U
[        U 5      -  S-  U[        U5      -  S-  -   U[        U5      -  S-  -   S:*  nU$ U
[        U 5      -  S-  U[        U5      -  S-  -   U[        U5      -  S-  -   S-
  nU$ )a„  Generate ellipsoid for given semi-axis lengths.

The respective semi-axis lengths are given along three dimensions in
Cartesian coordinates. Each dimension may use a different grid spacing.

Parameters
----------
a : float
    Length of semi-axis along x-axis.
b : float
    Length of semi-axis along y-axis.
c : float
    Length of semi-axis along z-axis.
spacing : 3-tuple of floats
    Grid spacing in three spatial dimensions.
levelset : bool
    If True, returns the level set for this ellipsoid (signed level
    set about zero, with positive denoting interior) as np.float64.
    False returns a binarized version of said level set.

Returns
-------
ellipsoid : (M, N, P) array
    Ellipsoid centered in a correctly sized array for given `spacing`.
    Boolean dtype unless `levelset=True`, in which case a float array is
    returned with the level set above 0.0 representing the ellipsoid.

r   ú&Parameters a, b, and c must all be > 0)é   r   r   r   é   é   )
Ú
ValueErrorÚnpÚr_ÚceilÚfloorÚrangeÚarangeÚmaxÚmgridÚfloat)ÚaÚbÚcÚspacingÚlevelsetÚoffsetÚlowÚhighÚdimÚnumÚxÚyÚzÚarrs                 Ú¡C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\skimage/draw/draw3d.pyÚ	ellipsoidr"      sÓ  € ð: 	
ˆQ‹�A˜“F  Q£ÜÐAÓBÐBä�U‰U�7‰^œbŸe™e G™nÑ,€Fô �'Š'”2—5‘5˜˜q˜‘>�/ FÑ*Ó
+€CÜ�8Š8”B—E‘E˜! ˜'‘N VÑ+¨aÑ/Ó0€Dä�QŽxˆØ‰I˜™Ñ  AÑ%¨Ó*Ø‹H˜‰M‹HÜ�iŠi˜™ $¡)¨W©\Ó:ˆØ�C�<Ø‹HœŸš˜s¨¡7™|Ó,Ñ,�Hñ ô �h‰hØˆA‰��a‘˜7 1™:Ð%ØˆA‰��a‘˜7 1™:Ð%ØˆA‰��a‘˜7 1™:Ð%ð	'ñ�G€Aˆ!ö Ø”E˜!“H‘ Ñ" a¬%°«(¡l°qÑ%8Ñ8¸AÄÀaÃ¹LÈQÑ;NÑNÐSTÑTˆð €Jð ”E˜!“H‘ Ñ" a¬%°«(¡l°qÑ%8Ñ8¸AÄÀaÃ¹LÈQÑ;NÑNÐRSÑSˆà€Jó    c                 óÄ   • U S::  d  US::  d  US::  a  [        S5      eS[        R                  -  U -  U-  U-  nSU-  [        SU S-  -  SUS-  -  SUS-  -  5      -  nX44$ )a*  Calculate analytical volume and surface area of an ellipsoid.

The surface area of an ellipsoid is given by

.. math:: S=4\pi b c R_G\!\left(1, \frac{a^2}{b^2}, \frac{a^2}{c^2}\right)

where :math:`R_G` is Carlson's completely symmetric elliptic integral of
the second kind [1]_. The latter is implemented as
:py:func:`scipy.special.elliprg`.

Parameters
----------
a : float
    Length of semi-axis along x-axis.
b : float
    Length of semi-axis along y-axis.
c : float
    Length of semi-axis along z-axis.

Returns
-------
vol : float
    Calculated volume of ellipsoid.
surf : float
    Calculated surface area of ellipsoid.

References
----------
.. [1] Paul Masson (2020). Surface Area of an Ellipsoid.
       https://analyticphysics.com/Mathematical%20Methods/Surface%20Area%20of%20an%20Ellipsoid.htm

r   r   gUUUUUUõ?r   r   r   )r	   r
   Úpir   )r   r   r   ÚvolÚsurfs        r!   Úellipsoid_statsr(   A   s{   € ðB 	
ˆQ‹�A˜“F  Q£ÜÐAÓBÐBð ”B—E‘E‰/˜AÑ
 Ñ
! AÑ
%€Cð ˆs‰7”W˜Q  A¡™X q¨1¨a©4¡x°°Q¸±T±Ó:Ñ:€Dàˆ9Ðr#   ))ç      ð?r)   r)   F)Únumpyr
   Úscipy.specialr   r"   r(   © r#   r!   Ú<module>r-      s   ðÛ Ý !ô9óx*r#   