projekty
/
imago.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
comments for hough and geometry
[imago.git]
/
imago_pack
/
geometry.py
diff --git
a/imago_pack/geometry.py
b/imago_pack/geometry.py
index
23f4095
..
f324692
100644
(file)
--- a/
imago_pack/geometry.py
+++ b/
imago_pack/geometry.py
@@
-1,8
+1,10
@@
-"""Imago geometry module"""
+"""Imago geometry module
.
"""
from math import sin, cos, atan, pi
class V(object):
from math import sin, cos, atan, pi
class V(object):
+ """Class for vector manipulation."""
+
def __init__(self, x, y):
self.x = x
self.y = y
def __init__(self, x, y):
self.x = x
self.y = y
@@
-38,6
+40,7
@@
class V(object):
return V(-self.y, self.x)
def projection(p, l, v):
return V(-self.y, self.x)
def projection(p, l, v):
+ #TODO what is this?
return V(*intersection(line(p, p + v.normal), line(*l)))
def l2ad((a, b), size):
return V(*intersection(line(p, p + v.normal), line(*l)))
def l2ad((a, b), size):