Esempio n. 1
0
def scanPixel(pixel, x, y, preview, laser, w, h):
    sX = (float(x) / float(w)) * 2.0 - 1.0
    sY = (float(y) / float(h)) * 2.0 - 1.0
    if pixel[0] != 0:
        if preview:
            pygame.draw.line(window, (255, 255, 255), (x, y), (x, y))
            pygame.display.flip()
        if laser:
            ol.dot((sX, sY), 100, ol.C_WHITE)
            ol.renderFrame(100)
Esempio n. 2
0
def scanPixel(pixel, x, y, preview, laser, w,h):
    sX=(float(x)/float(w))*2.0 - 1.0
    sY=(float(y)/float(h))*2.0 - 1.0
    if pixel[0] != 0:
        if preview:
            pygame.draw.line(window, (255, 255, 255), (x, y), (x, y))
            pygame.display.flip()
        if laser:
            ol.dot((sX,sY),100,ol.C_WHITE)
            ol.renderFrame(100)             
Esempio n. 3
0
	def run(self):
		ol.init()
		params = ol.RenderParams()
		params.render_flags = ol.RENDER_NOREORDER | ol.RENDER_GRAYSCALE
		ol.setRenderParams(params)

		while not self.die:
			ol.loadIdentity()
			for x,y in self.dots:
				ol.dot((x,y), 30, ol.C_WHITE)

			ol.renderFrame(100)
		ol.shutdown()
Esempio n. 4
0
    def run(self):
        ol.init()
        params = ol.RenderParams()
        params.render_flags = ol.RENDER_NOREORDER | ol.RENDER_GRAYSCALE
        ol.setRenderParams(params)

        while not self.die:
            ol.loadIdentity()
            for x, y in self.dots:
                ol.dot((x, y), 30, ol.C_WHITE)

            ol.renderFrame(100)
        ol.shutdown()