예제 #1
0
 def value(self,t):
     assert t <= self.t(self._it+self._tail_length)
     assert t >= self.t(self._it-self._tail_length)
     it = self.it(t)
     r = t/self._interval - it
     slot = self.slot(it)
     return colour_tools.blend_colours(self._history[slot],
                                       self._history[(slot+1)%self._length],
                                       r, True)
예제 #2
0
 def blend_colourisations(self,col1,col2,r):
     for va, rcol1,rcol2 in zip(self.rings,col1,col2):
         for v,col1,col2 in zip(va,rcol1,rcol2):
             v.color = colour_tools.blend_colours(col1,col2,r)