コード例 #1
0
ファイル: rsquare.py プロジェクト: riibiax/Lightscape
 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
コード例 #2
0
ファイル: rsquare.py プロジェクト: mbbx6spp/rop
    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
コード例 #3
0
ファイル: kal.py プロジェクト: slobberchops/rop
    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)
コード例 #4
0
ファイル: kal.py プロジェクト: slobberchops/rop
    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)
コード例 #5
0
ファイル: barber.py プロジェクト: vm-wylbur-pi/rop
 def __init__(self, matrix, config):
     self.width = int(matrix.width / SEGMENTS)
     self.hue = getHueGen(step=0.01)
コード例 #6
0
 def __init__(self, matrix, config):
     self.hue = getHueGen(0.0005)
コード例 #7
0
ファイル: chess.py プロジェクト: ak15199/rop
 def __init__(self, matrix, config):
     self.hue = getHueGen(0.0005)
コード例 #8
0
ファイル: fire.py プロジェクト: slobberchops/rop
 def __init__(self, matrix):
     self.points = []
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=random())
コード例 #9
0
ファイル: fire.py プロジェクト: vm-wylbur-pi/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)
コード例 #10
0
ファイル: lissajous.py プロジェクト: riibiax/rop
 def __init__(self, matrix):
     self.hue = getHueGen(0.01)
     self.phase_z = 0
コード例 #11
0
ファイル: fire.py プロジェクト: slobberchops/rop
 def __init__(self, matrix):
     self.points = []
     self.location = self._locationGenerator(matrix)
     self.hue = getHueGen(step=0.05, hue=random())
コード例 #12
0
ファイル: sine.py プロジェクト: 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
コード例 #13
0
ファイル: barber.py プロジェクト: ak15199/rop
 def __init__(self, matrix, config):
     self.width = int(matrix.width/SEGMENTS)
     self.hue = getHueGen(step=0.01)
コード例 #14
0
ファイル: fire.py プロジェクト: 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)