def get_bezier_path(self): bchunks = [] for i, (pa, pb) in enumerate(iterutils.pairwise(self.points)): b = bezier.create_bchunk_line_segment(pa, pb) b.start_time = float(i) b.stop_time = float(i + 1) bchunks.append(b) return pcurve.BezierPath(bchunks)
def get_bezier_path(self): bchunks = [] for i, (pa, pb) in enumerate(iterutils.pairwise(self.points)): b = bezier.create_bchunk_line_segment(pa, pb) b.start_time = float(i) b.stop_time = float(i+1) bchunks.append(b) return pcurve.BezierPath(bchunks)
def get_bezier_paths(self): bpaths = [] for va, vb in self.T: pa, pb = self.v_to_point[va], self.v_to_point[vb] b = bezier.create_bchunk_line_segment(pa, pb) b.start_time = 0.0 b.stop_time = 1.0 bpaths.append(pcurve.BezierPath([b])) return bpaths
def get_bezier_path(self): bchunks = [] npoints = len(self.points) for i, j in iterutils.pairwise(range(npoints)): pa, pb = self.points[i], self.points[j] ta, tb = self.times[i], self.times[j] b = bezier.create_bchunk_line_segment(pa, pb) b.start_time = ta b.stop_time = tb bchunks.append(b) return pcurve.BezierPath(bchunks)
def make_half_axis(axis, sign, radius): """ This is a helper function. @param axis: in {0, 1, 2} @return: bpath """ origin = np.zeros(3) target = np.zeros(3) target[axis] = sign * radius b = bezier.create_bchunk_line_segment(origin, target) bpath = pcurve.BezierPath([b]) b.parent_ref = id(bpath) return bpath