Ejemplo n.º 1
0
def loadILD (fname):
	fstream = open (fname, 'rb')
	return ILDA.read (fstream)
Ejemplo n.º 2
0
# display ILDA animations from a given file

from LaserDisplay import *
import ILDA

#LD = LaserDisplay()
LD = LaserDisplay({"server": "localhost", "port": 50000})
LD.set_scan_rate(37000)
LD.set_blanking_delay(0)

WIDTH = 200
HEIGHT = 200
import sys
import random
ilda_file = open(sys.argv[1], 'rb')
ilda_frames = ILDA.readFrames(ilda_file)

frames = []
for f in ilda_frames:
    frame = []
    for p in f.iterPoints():
        frame.append(
            [WIDTH / 2 + (WIDTH / 2) * p.x, HEIGHT / 2 + (HEIGHT / 2) * p.y])
    frames.append(frame)
ilda_file.close()

LD.set_color(YELLOW)

for frame in frames:
    for _ in range(2):
        for point in frame:
Ejemplo n.º 3
0
from LaserDisplay import *
import ILDA

#LD = LaserDisplay()
LD = LaserDisplay({"server":"localhost","port": 50000})
LD.set_scan_rate(37000)
LD.set_blanking_delay(0)


WIDTH=200
HEIGHT=200
import sys
import random
ilda_file = open(sys.argv[1], 'rb')
ilda_frames = ILDA.readFrames(ilda_file)

frames = []
for f in ilda_frames:
  frame = []
  for p in f.iterPoints():
    frame.append([WIDTH/2 + (WIDTH/2)*p.x, HEIGHT/2 + (HEIGHT/2)*p.y])
  frames.append(frame)
ilda_file.close()

LD.set_color(YELLOW)

for frame in frames:
  for _ in range(2):
    for point in frame:
        #LD.set_color(p.color)