示例#1
0
 def _cone(self, axis, vector, limit=180, res=361, split=False):
     a = np.linspace(-limit, limit, res)
     x, y = l2xy(*v2l(rodrigues(axis, vector, a)))
     if split:
         dist = np.hypot(np.diff(x), np.diff(y))
         ix = np.nonzero(dist > 1)[0]
         x = np.insert(x, ix + 1, np.nan)
         y = np.insert(y, ix + 1, np.nan)
     return x, y
示例#2
0
 def _cone(self, axis, vector, limit=180, res=361, split=False):
     a = np.linspace(-limit, limit, res)
     x, y = l2xy(*v2l(rodrigues(axis, vector, a)))
     if split:
         dist = np.hypot(np.diff(x), np.diff(y))
         ix = np.nonzero(dist > 1)[0]
         x = np.insert(x, ix + 1, np.nan)
         y = np.insert(y, ix + 1, np.nan)
     return x, y