From 27a4f8e84ccff62415abeac93b606a81d8935679 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 29 Nov 2017 23:29:42 +0000 Subject: [PATCH] helixish: well, it makes a brokenish thing Signed-off-by: Ian Jackson --- findcurve.c | 15 ++++++++++----- helixish.py | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/findcurve.c b/findcurve.c index 2045761..9d86ff4 100644 --- a/findcurve.c +++ b/findcurve.c @@ -57,18 +57,23 @@ static double cb_metric(void *xp, void *yp) { return sqrt(s); } -static void cb_print(void *xp) { - const double *x = xp; - double F[N]; +static void printcore(const double *x) { int i; + double F[N]; X_EXTRACT; F_POPULATE; - printf("\n["); + printf("["); for (i=0; i<6; i++) printf(" %.18g,", x[i]); for (i=0; i<6; i++) printf(" %.18g,", F[i]); printf(" ]\n"); } +static void __attribute__((unused)) cb_print(void *xp) { + const double *x = xp; + printf("\n"); + printcore(x); +} + static double scan1double(void) { double v; int r; @@ -111,7 +116,7 @@ int main(void) { 0, // cb_print, 0,0,0, sizeof(startpoint), siman_params); - cb_print(startpoint); + printcore(startpoint); printf("[]\n"); fflush(stdout); diff --git a/helixish.py b/helixish.py index 4411a35..d401efd 100644 --- a/helixish.py +++ b/helixish.py @@ -218,7 +218,7 @@ class HelixishCurve(): hc.findcurve_result = l[0:6] 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 -- 2.30.2