chiark / gitweb /
helixish: try three paths
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Apr 2018 09:58:44 +0000 (10:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Apr 2018 09:58:48 +0000 (10:58 +0100)
This shows that this approach does not work.

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

index 77c311b34097692d8558208b243baa438ba46e0c..57a0d7a7b95c47b281e767cbad4a93365581698b 100644 (file)
@@ -281,7 +281,8 @@ class HelixishCurve():
       #hc.findcurve_result = findcurve_start
       hc.threshold = l[0]**2
       hc.total_dist = hc.threshold + l[1]**2
-      #vdbg().curve( hc.point_at_t )
+
+    vdbg().curve( hc.point_at_t )
 
   def point_at_t(hc, normalised_parameter):
     dist = normalised_parameter * hc.total_dist
index f228bce4bdb34171c19b414b5e470e6a32cb52e2..40b9324d5207019af25ab0023c5d010f0f835fb0 100644 (file)
@@ -82,8 +82,10 @@ class MoebiusHalf:
     m._thetas = [ u * tau for u in np.linspace(0, 1, nu+1) ]
     m._cp2b = BezierSegment([ (c,) for c in [0.33,0.33, 1.50]])
     m._beziers = [ m._bezier(theta) for theta in m._thetas ]
-    check = int(nu/3)
-    m._beziers[check] = m._bezier(m._thetas[check], HelixishCurve)
+    check = int(nu/3)-1
+    m._bezier(m._thetas[check], HelixishCurve)
+    m._bezier(m._thetas[check+1], HelixishCurve)
+    m._bezier(m._thetas[check+2], HelixishCurve)
   def _bezier(m, theta, constructor=DoubleCubicBezier):
     cp = [None] * 4
     cp[0] =               m.edge   .point(theta)
diff --git a/visual b/visual
index f0b9b49be253e60d5fc15507f11a86cdde57475a..8795cd1daa27c15b1bcb26e71a8b2fa220f6ddab 100755 (executable)
--- a/visual
+++ b/visual
@@ -17,7 +17,7 @@ scene.fov = 1E-3
 from moebius import *
 from moedebug import *
 
-nv = 40
+nv = 20
 nw = 40
 
 class Visdebug(BaseVisdebug):