chiark
/
gitweb
/
~ian
/
moebius3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
work on norm matrix
[moebius3.git]
/
moebius.py
diff --git
a/moebius.py
b/moebius.py
index d9e452d4d70105da8b537106ddc984bd2830fd45..3cea68d4f6c2b2145dc89496077ac8a0e0a96f37 100644
(file)
--- a/
moebius.py
+++ b/
moebius.py
@@
-15,6
+15,9
@@
unit_x = np.array((1,0,0))
unit_y = np.array((0,1,0))
unit_z = np.array((0,0,1))
+def unit_v(v):
+ return v / np.linalg.norm(v)
+
class DoubleCubicBezier():
def __init__(db, cp):
single = BezierSegment(cp)