From: Ian Jackson Date: Sat, 7 Apr 2018 09:59:56 +0000 (+0100) Subject: Revert "helixish: try three paths" X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;ds=sidebyside;h=9317f480a6e3af886f4ce0f71cef0622edadcba5;p=moebius3.git Revert "helixish: try three paths" This reverts commit 7de6976b27662081219291a52947d19bee422d44. --- diff --git a/helixish.py b/helixish.py index 57a0d7a..77c311b 100644 --- a/helixish.py +++ b/helixish.py @@ -281,8 +281,7 @@ 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 40b9324..f228bce 100644 --- a/moebius.py +++ b/moebius.py @@ -82,10 +82,8 @@ 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)-1 - m._bezier(m._thetas[check], HelixishCurve) - m._bezier(m._thetas[check+1], HelixishCurve) - m._bezier(m._thetas[check+2], HelixishCurve) + check = int(nu/3) + m._beziers[check] = m._bezier(m._thetas[check], HelixishCurve) def _bezier(m, theta, constructor=DoubleCubicBezier): cp = [None] * 4 cp[0] = m.edge .point(theta) diff --git a/visual b/visual index 8795cd1..f0b9b49 100755 --- a/visual +++ b/visual @@ -17,7 +17,7 @@ scene.fov = 1E-3 from moebius import * from moedebug import * -nv = 20 +nv = 40 nw = 40 class Visdebug(BaseVisdebug):