simulariumio/mcell/mcell_converter.py
def _get_rotation_matrix(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
        """
        Orthonormalize and cross the vectors to get a rotation matrix
        """
        v1 = McellConverter._normalize(v1)
        v2 = McellConverter._normalize(v2)
        v2 = McellConverter._normalize(v2 - (np.dot(v1, v2) / np.dot(v1, v1)) * v1)
        v3 = np.cross(v2, v1)
        return np.array(
            [
                np.array([v2[0], v1[0], v3[0]]),
                np.array([v2[1], v1[1], v3[1]]),
                np.array([v2[2], v1[2], v3[2]]),
            ]
        )

        Orthonormalize and cross the vectors to get a rotation matrix
        
Orthonormalize and cross the vectors to get a rotation matrix
Orthonormalize and cross the vectors to get a rotation matrix
def _get_rotation_matrix(v1: np.ndarray, v2: np.ndarray) -> np.ndarray:
        v1 = McellConverter._normalize(v1)
        v2 = McellConverter._normalize(v2)
        v2 = McellConverter._normalize(v2 - (np.dot(v1, v2) / np.dot(v1, v1)) * v1)
        v3 = np.cross(v2, v1)
        return np.array(
            [
                np.array([v2[0], v1[0], v3[0]]),
                np.array([v2[1], v1[1], v3[1]]),
                np.array([v2[2], v1[2], v3[2]]),
            ]
        )
def _get_rotation_matrix ( v1 : np . ndarray , v2 : np . ndarray ) -> np . ndarray : v1 = McellConverter . _normalize ( v1 ) v2 = McellConverter . _normalize ( v2 ) v2 = McellConverter . _normalize ( v2 - ( np . dot ( v1 , v2 ) / np . dot ( v1 , v1 ) ) * v1 ) v3 = np . cross ( v2 , v1 ) return np . array ( [ np . array ( [ v2 [ 0 ] , v1 [ 0 ] , v3 [ 0 ] ] ) , np . array ( [ v2 [ 1 ] , v1 [ 1 ] , v3 [ 1 ] ] ) , np . array ( [ v2 [ 2 ] , v1 [ 2 ] , v3 [ 2 ] ] ) , ] )
Orthonormalize and cross the vectors to get a rotation matrix
Orthonormalize and cross the vectors to get a rotation matrix
"""
        Orthonormalize and cross the vectors to get a rotation matrix
        """
v1
np.ndarray
v2
np.ndarray