예제 #1
0
파일: interlace.py 프로젝트: BIGtigr/xgcode
 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)
예제 #2
0
 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)
예제 #3
0
 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
예제 #4
0
파일: interlace.py 프로젝트: BIGtigr/xgcode
 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
예제 #5
0
 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)
예제 #6
0
파일: interlace.py 프로젝트: BIGtigr/xgcode
 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)
예제 #7
0
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
예제 #8
0
파일: 20110808a.py 프로젝트: BIGtigr/xgcode
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