chiark / gitweb /
introduce Moebius.details()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 7 Nov 2017 12:38:37 +0000 (12:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 7 Nov 2017 12:38:39 +0000 (12:38 +0000)
nfc because no callers yet

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
moebius.py

index 6d0d2bc2dc3ea33cbd7df9985aec435621ac10f6..367243c0ca38a4f10cebeda1656f83558e6ac9db 100644 (file)
@@ -174,3 +174,17 @@ class Moebius():
     return m.h.point_offset(offset=
                             offset if w <= m.nt else -offset,
                             **m._vw2tiu_kw(v,w))
+
+  def details(m, v, w):
+    '''
+    returns tuple of 4 vectors:
+           - point location
+           - normal (+ve is in the +ve y direction at iu=t=0) unit vector
+           - along extent   (towrds +ve v)                    unit vector
+           - along traverse (towards +ve w)                   unit vector
+    '''
+    p, normal, vec_v, vec_w = m.h.dtails(**m._vw2tiu_kw(v,w))
+    if w > m.nt:
+      normal = -normal
+      vec_w  = -vec_w
+    return p, normal, vec_v, vec_w