Esempio n. 1
0
 def __init__(self, matrix):
     self.hue = getHueGen(0.001)
     self.theta = 0.0
     self.matrix = OPCMatrix(SCALE*matrix.width, SCALE*matrix.height, None, True)
     self.x = SCALE * matrix.width / 2.0
     self.y = SCALE * matrix.height / 2.0
     self.r = 6.5 * SCALE
Esempio n. 2
0
    def __init__(self, matrix):
        self.hue = getHueGen(0.001)
        self.theta = 0.0
        self.matrix = ScaledMatrix(matrix, scale=SCALE)

        # the width of the rectangle should allow for good fit when it is
        # rotated 45 degrees. We can invoke the work of pythagoras to determine
        # the hypotenuse, but rule of thumb (widest point is 1.7 broader than
        # the narrowest
        #
        self.r = min(self.matrix.midWidth, self.matrix.midHeight) * 0.7
Esempio n. 3
0
    def __init__(self, matrix, config):
        self.angle = 0
        self.hue = getHueGen(0.01)
        self.radius = sqrt(matrix.numpix) * self.FITHALF
        self.center = Point(matrix.midWidth, matrix.midHeight)
        self.pieslice = self._pieslice(-30, 30)

        # used to help with scaling small displays
        # freq will have a value of 1 for kilopix displays and hold a
        # larger value for smaller displays (up to 4)
        self.freq = min(4, max(1, 1024.0/matrix.numpix))
        self.clock = 0

        # create mask
        self.mask = OPCMatrix(matrix.width, matrix.height, None)
        self.mask.fillPoly(self.pieslice, WHITE)
        matrix.fillPoly(self.pieslice, WHITE)

        # create intermediate buffers
        self.intermediate1 = OPCMatrix(matrix.width, matrix.height, None)
        self.intermediate2 = OPCMatrix(matrix.width, matrix.height, None)

        # create private buffer for final rendering before rotate/display
        self.private = OPCMatrix(matrix.width, matrix.height, None)
Esempio n. 4
0
    def __init__(self, matrix, config):
        self.angle = 0
        self.hue = getHueGen(0.01)
        self.radius = sqrt(matrix.numpix) * self.FITHALF
        self.center = Point(matrix.midWidth, matrix.midHeight)
        self.pieslice = self._pieslice(-30, 30)

        # used to help with scaling small displays
        # freq will have a value of 1 for kilopix displays and hold a
        # larger value for smaller displays (up to 4)
        self.freq = min(4, max(1, 1024.0 / matrix.numpix))
        self.clock = 0

        # create mask
        self.mask = OPCMatrix(matrix.width, matrix.height, None)
        self.mask.fillPoly(self.pieslice, WHITE)
        matrix.fillPoly(self.pieslice, WHITE)

        # create intermediate buffers
        self.intermediate1 = OPCMatrix(matrix.width, matrix.height, None)
        self.intermediate2 = OPCMatrix(matrix.width, matrix.height, None)

        # create private buffer for final rendering before rotate/display
        self.private = OPCMatrix(matrix.width, matrix.height, None)
Esempio n. 5
0
 def __init__(self, matrix, config):
     self.width = int(matrix.width / SEGMENTS)
     self.hue = getHueGen(step=0.01)
Esempio n. 6
0
 def __init__(self, matrix, config):
     self.hue = getHueGen(0.0005)
Esempio n. 7
0
File: chess.py Progetto: ak15199/rop
 def __init__(self, matrix, config):
     self.hue = getHueGen(0.0005)
Esempio n. 8
0
 def __init__(self, matrix):
     self.points = []
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=random())
Esempio n. 9
0
 def __init__(self, matrix):
     self.points = []
     self.expires = int(matrix.numpix / 2)
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=randint(0, 100) / 100.0)
Esempio n. 10
0
 def __init__(self, matrix):
     self.hue = getHueGen(0.01)
     self.phase_z = 0
Esempio n. 11
0
 def __init__(self, matrix):
     self.points = []
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=random())
Esempio n. 12
0
File: sine.py Progetto: mbbx6spp/rop
    def __init__(self, matrix):
        self.matrix = ScaledMatrix(matrix, scale=2)
        self.hue1 = getHueGen(step=0.00001, hue=0.0)
        self.hue2 = getHueGen(step=0.00001, hue=0.5)

        self.phase = 0
Esempio n. 13
0
 def __init__(self, matrix, config):
     self.width = int(matrix.width/SEGMENTS)
     self.hue = getHueGen(step=0.01)
Esempio n. 14
0
File: fire.py Progetto: ak15199/rop
 def __init__(self, matrix):
     self.points = []
     self.expires = int(matrix.numpix/2)
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=randint(0, 100)/100.0)