chiark / gitweb /
helixish: well, it makes a brokenish thing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 Nov 2017 23:29:42 +0000 (23:29 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 Nov 2017 23:29:42 +0000 (23:29 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
findcurve.c
helixish.py

index 2045761c0a5a9876795e38dbfc474bbd9d68afb6..9d86ff485375f03f670d9415876ab1cb8462d48b 100644 (file)
@@ -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);
index 4411a35c31958bf8a0af7700b20412fa09b58fa2..d401efd837b0195a35cce31e5945a454391456ab 100644 (file)
@@ -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