From: Ian Jackson Date: Sun, 31 Dec 2017 19:55:49 +0000 (+0000) Subject: Revert "helixish: attempt at the whole thing" X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=4fc18defa1be2c148a8e56d2d7bc1f1d91caab2a;p=moebius3.git Revert "helixish: attempt at the whole thing" This reverts commit 906edec3ef60cf3e0567c713b2a68688edb634d4. --- diff --git a/findcurve.c b/findcurve.c index c038182..3c886f6 100644 --- a/findcurve.c +++ b/findcurve.c @@ -122,7 +122,7 @@ int main(void) { gsl_siman_solve(rng, startpoint, cb_Efunc, cb_step, cb_metric, - 0, //cb_print, + cb_print, 0,0,0, sizeof(startpoint), siman_params); printcore(startpoint); diff --git a/helixish.py b/helixish.py index 2c6043e..77c311b 100644 --- a/helixish.py +++ b/helixish.py @@ -163,7 +163,7 @@ class HelixishCurve(): delta = atan2(*(end - C)[0:2]) - atan2(*(start - C)[0:2]) dbg('railway_ST C', C, 'start', start, 'end', end, 'delta', delta) if delta < 0: delta += tau - s = delta * abs(railway_r) + s = delta * railway_r dbg('railway_ST delta', delta, 'r', railway_r, 's', s) return s diff --git a/moebius.py b/moebius.py index e5a81ac..f228bce 100644 --- a/moebius.py +++ b/moebius.py @@ -81,9 +81,9 @@ class MoebiusHalf: m.nu = nu 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, HelixishCurve) for theta in m._thetas ] - #check = int(nu/3) - #m._beziers[check] = m._bezier(m._thetas[check], HelixishCurve) + m._beziers = [ m._bezier(theta) for theta in m._thetas ] + 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 d623bfb..64d4b6c 100755 --- a/visual +++ b/visual @@ -18,7 +18,7 @@ from moebius import * from moedebug import * nv = 20 -nw = 80 +nw = 40 class Visdebug(BaseVisdebug): def curve(vd, fn, color=color.yellow): @@ -40,7 +40,7 @@ class Visdebug(BaseVisdebug): rate(1E-8) dbg_file(sys.stderr) -#vdbg_enable(Visdebug()) +vdbg_enable(Visdebug()) m = Moebius(nv, nw)