Example #1
0
 def __init__(self, r, sweep=None):
     super(circle, self).__init__()
     r = D(r)
     self.points.append((D(0), D(0)))
     self.points.append((r, D(0)))
     self.points.append((D(0), r))
     if sweep is not None:
         assert sweep > 0 and sweep < 360
         sweep = dmath.radians(D(sweep))
         self.points.append((dmath.cos(sweep) * r, dmath.sin(sweep) * r))
     self.full = sweep is None
Example #2
0
 def __init__(self, a):
     super(rotate, self).__init__()
     a = dmath.radians(D(a))
     self.m[0,0] = self.m[1,1] = D(dmath.cos(a))
     self.m[0,1] = D(dmath.sin(a))
     self.m[1,0] = -D(dmath.sin(a))