simulariumio/mcell/mcell_converter.py
def _get_rotation_euler_angles_for_normals(
        normals: np.ndarray, angle: float = None
    ) -> np.ndarray:
        """
        Generate an orientation around each normal and return euler angles
        Either use the given angle or random ones
        """
        if angle is None:
            angles = np.rad2deg(2 * np.pi) * np.random.random(normals.shape[0])
        else:
            angles = np.array(normals.shape[0] * [angle])
        return np.array(
            [McellConverter._get_euler_angles(n, a) for n, a in zip(normals, angles)]
        )

        Generate an orientation around each normal and return euler angles
        Either use the given angle or random ones
        
Generate an orientation around each normal and return euler angles
Either use the given angle or random ones
Generate an orientation around each normal and return euler angles Either use the given angle or random ones
def _get_rotation_euler_angles_for_normals(
        normals: np.ndarray, angle: float = None
    ) -> np.ndarray:
        if angle is None:
            angles = np.rad2deg(2 * np.pi) * np.random.random(normals.shape[0])
        else:
            angles = np.array(normals.shape[0] * [angle])
        return np.array(
            [McellConverter._get_euler_angles(n, a) for n, a in zip(normals, angles)]
        )
def _get_rotation_euler_angles_for_normals ( normals : np . ndarray , angle : float = None ) -> np . ndarray : if angle is None : angles = np . rad2deg ( 2 * np . pi ) * np . random . random ( normals . shape [ 0 ] ) else : angles = np . array ( normals . shape [ 0 ] * [ angle ] ) return np . array ( [ McellConverter . _get_euler_angles ( n , a ) for n , a in zip ( normals , angles ) ] )
Generate an orientation around each normal and return euler angles
Either use the given angle or random ones
Generate an orientation around each normal and return euler angles Either use the given angle or random ones
"""
        Generate an orientation around each normal and return euler angles
        Either use the given angle or random ones
        """
normals
np.ndarray
angle
float