§
    (Áôg×  ã                   ó(   — d dl Zd dlmZ dd„Zd„ ZdS )é    N)Úelliprg©ç      ð?r   r   Fc           	      ó.  — | dk    s|dk    s|dk    rt          d¦  «        ‚t          j        d         t          j        |         z  }t          j        t          j        | ||f          |z
  ¦  «        }t          j        t          j        | ||f         |z   dz   ¦  «        }t          d¦  «        D ]‚}||         ||         z
  dz  dk    r||xx         dz  cc<   t          j        ||         ||         ||         ¦  «        }	d|	vr,||xx         t          j        |	|	dk              ¦  «        z  cc<   Œƒt          j        |d         |d         |d         …|d         |d         |d         …|d         |d         |d         …f         \  }
}}|sF|
t          | ¦  «        z  dz  |t          |¦  «        z  dz  z   |t          |¦  «        z  dz  z   dk    }nD|
t          | ¦  «        z  dz  |t          |¦  «        z  dz  z   |t          |¦  «        z  dz  z   dz
  }|S )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                 ú\/var/www/html/bac/bac_backend/python/env/lib/python3.11/site-packages/skimage/draw/draw3d.pyÚ	ellipsoidr$      s  € ð: 	
ˆQŠˆ�A˜’F�F  Q¢ ÝÐAÑBÔBÐBåŒU�7Œ^�bœe GœnÑ,€Fõ Œ'•2”5˜˜A˜q˜”>�/ FÑ*Ñ
+Ô
+€CÝŒ8•B”E˜!˜Q ˜'”N VÑ+¨aÑ/Ñ0Ô0€Då�Q‰xŒxð -ð -ˆØ�ŒI˜˜CœÑ  AÑ%¨Ò*Ð*Ø�ˆHˆHŒH˜‰MˆHˆH‰HÝŒi˜˜Cœ $ s¤)¨W°S¬\Ñ:Ô:ˆØ�Cˆ<ˆ<Ø�ˆHˆHŒH�œ˜s 3¨¢7œ|Ñ,Ô,Ñ,ˆHˆH‰Høõ ŒhØˆAŒ��a”˜7 1œ:Ð%ØˆAŒ��a”˜7 1œ:Ð%ØˆAŒ��a”˜7 1œ:Ð%ð	'ô�G€A€qˆ!ð ð TØ•E˜!‘H”H‘ Ñ" a­%°©(¬(¡l°qÑ%8Ñ8¸AÅÀaÁÄ¹LÈQÑ;NÑNÐSTÒTˆˆà•E˜!‘H”H‘ Ñ" a­%°©(¬(¡l°qÑ%8Ñ8¸AÅÀaÁÄ¹LÈQÑ;NÑNÐRSÑSˆà€Jó    c                 óÎ   — | dk    s|dk    s|dk    rt          d¦  «        ‚dt          j        z  | z  |z  |z  }d|z  t          d| dz  z  d|dz  z  d|dz  z  ¦  «        z  }||fS )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�F  Q¢ ÝÐAÑBÔBÐBð •B”E‰/˜AÑ
 Ñ
! AÑ
%€Cð ˆs‰7•W˜Q  A¡™X q¨1¨a©4¡x°°Q¸±T±Ñ:Ô:Ñ:€Dà�ˆ9Ðr%   )r   F)Únumpyr   Úscipy.specialr   r$   r*   © r%   r#   ú<module>r.      sQ   ðØ Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !ð9ð 9ð 9ð 9ðx*ð *ð *ð *ð *r%   