-class V():
- def __init__(self, x, y):
- self.x = x
- self.y = y
-
- def __add__(self, other):
- return V(self.x + other.x, self.y + other.y)
-
- def __sub__(self, other):
- return V(self.x - other.x, self.y - other.y)
-
- def __rmul__(self, other):
- return V(other * self.x, other * self.y)
-
- def t(self):
- return (self.x, self.y)
-
-def find(lines, size, l1, l2, bounds, hough, do_something):
+def projection(point, line, vector):
+ return V(*intersection(g_line(point, point + vector.normal), g_line(*line)))
+
+def job_br1(args):
+ X, Y, im_l, a, b, c, d, s, v1, v2, k, hough, size = args
+ return [(distance(im_l,
+ get_grid(a + X[y] * s * v1,
+ b + Y[y] * s * v1,
+ c, d, hough, size),
+ size), a + X[y] * s * v1, b + Y[y] * s * v1) for y in range(2 *k)]
+
+def job_br2(args):
+ X, Y, im_l, a, b, c, d, s, v1, v2, k, hough, size = args
+ return [(distance(im_l,
+ get_grid(a, b, c + X[y] * s * v2,
+ d + Y[y] * s * v2,
+ hough, size),
+ size), c + X[y] * s * v2, d + Y[y] * s * v2) for y in range(2 *k)]
+
+def find(lines, size, l1, l2, bounds, hough, do_something, im_h):