From 7de6976b27662081219291a52947d19bee422d44 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Apr 2018 10:58:44 +0100 Subject: [PATCH] helixish: try three paths This shows that this approach does not work. Signed-off-by: Ian Jackson --- helixish.py | 3 ++- moebius.py | 6 ++++-- visual | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/helixish.py b/helixish.py index 77c311b..57a0d7a 100644 --- a/helixish.py +++ b/helixish.py @@ -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 diff --git a/moebius.py b/moebius.py index f228bce..40b9324 100644 --- a/moebius.py +++ b/moebius.py @@ -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 f0b9b49..8795cd1 100755 --- 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): -- 2.30.2