This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import numpy as np | |
| import matplotlib.pyplot as plt | |
| from mpl_toolkits.mplot3d import Axes3D | |
| import open3d as o3d | |
| import pykitti | |
| def get_quadrant(point): | |
| res = 0 | |
| x = point[0] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import copy | |
| import datetime | |
| import numpy as np | |
| import sklearn | |
| import open3d as o3d | |
| import matplotlib | |
| from matplotlib import pyplot as plt | |
| from sklearn import decomposition | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import numpy as np | |
| import scipy | |
| from scipy.spatial.transform import Rotation | |
| import pyquaternion | |
| def quaternon_from_two_vectors(a, b): | |
| a_n = a / np.linalg.norm(a) | |
| b_n = b / np.linalg.norm(b) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import numpy as np | |
| import scipy | |
| import scipy.special | |
| import matplotlib.pyplot as plt | |
| def get_weights(n): | |
| W = [] | |
| for i in np.arange(n): | |
| def berstein_poly(t, i=i, n=n-1): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import numpy as np | |
| import matplotlib.pyplot as plt | |
| p0 = np.array([0, 0]) | |
| p1 = np.array([1, 0]) | |
| p0t = np.array([1, 1]) | |
| p1t = np.array([-1, -1]) | |
| P = np.array([p0, p1, p0t, p1t]) | |
| H = np.array([[2, -2, 1, 1], [-3, 3, -2, -1], [0, 0, 1, 0], [1, 0, 0, 0]]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from mpl_toolkits.mplot3d import Axes3D | |
| from matplotlib import cm | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| P00 = np.array([0, 0, 0]) | |
| P01 = np.array([1, 0, 0]) | |
| P02 = np.array([2, 0, 0]) | |
| P03 = np.array([3, 0, 0]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from mpl_toolkits.mplot3d import Axes3D | |
| from matplotlib import cm | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| P00 = np.array([0, 0, 0]) | |
| P01 = np.array([1, 0, 0]) | |
| P02 = np.array([2, 0, 0]) | |
| P10 = np.array([0, 1, 2]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from mpl_toolkits.mplot3d import Axes3D | |
| from matplotlib import cm | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| # number of points | |
| num = 4 | |
| dim = 3 | |
| min = -20 | |
| max = 20 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from mpl_toolkits.mplot3d import Axes3D | |
| from matplotlib import cm | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| P = lambda u, w, P00, P01, P10, P11: P00 * (1 - u) * (1 - w) + P01 * w * (1 - u) + P10 * u * (1 - w) + P11 * u * w | |
| dpdu = lambda w, P00, P01, P10, P11: w * (P11 - P01 - P10 + P00) + P10 - P00 | |
| dpdw = lambda u, P00, P01, P10, P11: u * (P11 - P01 - P10 + P00) + P01 - P00 | |
| N = lambda u, w, P00, P01, P10, P11: np.cross(dpdu(w, P00, P01, P10, P11), dpdw(u, P00, P01, P10, P11)) |