Exemple #1
0
 def drawsilk(self):
     t1 = Curve.DivideByCount(self.flow[0].retrail, 99, True)
     t2 = Curve.DivideByCount(self.flow[1].retrail, 99, True)
     for i in xrange(99):
         pt1 = Curve.PointAt(self.flow[0].retrail, t1[i])
         pt2 = Curve.PointAt(self.flow[1].retrail, t2[i])
         self.silks.append(Line(pt1, pt2))
Exemple #2
0
def drawside(crv, sim):
    for i in xrange(len(crv)):
        t = [[], [], [], []]
        for j in xrange(len(crv[i])):
            t[j] = Curve.DivideByCount(crv[i][j], 29, True)
        for k in xrange(len(t[j])):
            pt0 = Curve.PointAt(crv[i][0], t[0][k])
            pt1 = Curve.PointAt(crv[i][1], t[1][k])
            pt2 = Curve.PointAt(crv[i][2], t[2][k])
            pt3 = Curve.PointAt(crv[i][3], t[3][k])
            sim.append(Line(pt0, pt1))
            sim.append(Line(pt2, pt3))
    return sim
Exemple #3
0
 def drawsimple(self):
     self.trail = Curve.CreateInterpolatedCurve(self.ptlist, 3)
     self.retrail = Curve.Rebuild(self.trail, 30, 3, True)
     self.retrail.Domain = rg.Interval(0, 1)
     crvts = Curve.DivideByCount(self.retrail, 29, True)
     self.reptlist = []
     for i in xrange(len(crvts)):
         self.reptlist.append(Curve.PointAt(self.retrail, crvts[i]))