Ejemplo 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
Ejemplo 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
Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 5
0
 def __init__(self, matrix, config):
     self.width = int(matrix.width / SEGMENTS)
     self.hue = getHueGen(step=0.01)
Ejemplo n.º 6
0
 def __init__(self, matrix, config):
     self.hue = getHueGen(0.0005)
Ejemplo n.º 7
0
Archivo: chess.py Proyecto: ak15199/rop
 def __init__(self, matrix, config):
     self.hue = getHueGen(0.0005)
Ejemplo n.º 8
0
 def __init__(self, matrix):
     self.points = []
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=random())
Ejemplo 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)
Ejemplo n.º 10
0
 def __init__(self, matrix):
     self.hue = getHueGen(0.01)
     self.phase_z = 0
Ejemplo n.º 11
0
 def __init__(self, matrix):
     self.points = []
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=random())
Ejemplo n.º 12
0
Archivo: sine.py Proyecto: 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
Ejemplo n.º 13
0
 def __init__(self, matrix, config):
     self.width = int(matrix.width/SEGMENTS)
     self.hue = getHueGen(step=0.01)
Ejemplo n.º 14
0
Archivo: fire.py Proyecto: 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)