# Path: opc/hue.py
# def getColorGen(step=0.05, hue=0, sat=1, val=1):
#     """
#     Generator that returns a stream of shades as colors
#     """
#     hue = getHueGen(step, hue)
#     while True:
#         yield hsvToRgb(next(hue), sat, val)


from opc.hue import getColorGen
from math import sqrt
from random import random

        self.y += self.dy
        if self.y <= 0 or self.y >= (matrix.height-1):
            self.dy = -self.dy

        return self


class Vector(object):

    def __init__(self, bases, color):
        self.points = [Point(base.x, base.y, base.dx, base.dy)
                       for base in bases]
        self.color = color

    def clock(self, matrix):
        for point in self.points:
            point.clock(matrix)

        p = self.points
        matrix.drawLine(p[0].x, p[0].y, p[1].x, p[1].y, self.color)


class Vectors(object):

    DELTA = 0.41

    def __init__(self, matrix, count):

        pointgen = self.positionGenerator(matrix)

# Path: opc/hue.py
# def getColorGen(step=0.05, hue=0, sat=1, val=1):
#     """
#     Generator that returns a stream of shades as colors
#     """
#     hue = getHueGen(step, hue)
#     while True:
#         yield hsvToRgb(next(hue), sat, val)


# Path: art/bounce.py
from opc.hue import getColorGen
from math import sqrt
from random import random


        self.y += self.dy
        if self.y <= 0 or self.y >= (matrix.height-1):
            self.dy = -self.dy

        return self


class Vector(object):

    def __init__(self, bases, color):
        self.points = [Point(base.x, base.y, base.dx, base.dy)
                       for base in bases]
        self.color = color

    def clock(self, matrix):
        for point in self.points:
            point.clock(matrix)

        p = self.points
        matrix.drawLine(p[0].x, p[0].y, p[1].x, p[1].y, self.color)


class Vectors(object):

    DELTA = 0.41

    def __init__(self, matrix, count):

        pointgen = self.positionGenerator(matrix)

        huegen = getColorGen(step=0.15, hue=random())