From f6b8e0eae4374f339487a33e3e4fe5462d5816e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 25 Nov 2017 10:16:00 +0100 Subject: New upstream version 2.0.0 --- plot/Imakefile | 0 plot/Jamfile | 7 ++++--- plot/License.txt | 0 plot/Readme.txt | 0 plot/X3DOM_LICENSE.txt | 0 plot/afiles | 0 plot/plot.c | 37 +++++++++++++++++++++++++++++++------ plot/plot.h | 11 ++++++++++- plot/vrml.c | 19 +++++++++++-------- plot/vrml.h | 4 ++++ plot/x3dom.css | 0 plot/x3dom.css.h | 0 plot/x3dom.js | 0 plot/x3dom.js.h | 0 14 files changed, 60 insertions(+), 18 deletions(-) mode change 100644 => 100755 plot/Imakefile mode change 100644 => 100755 plot/Jamfile mode change 100644 => 100755 plot/License.txt mode change 100644 => 100755 plot/Readme.txt mode change 100644 => 100755 plot/X3DOM_LICENSE.txt mode change 100644 => 100755 plot/afiles mode change 100644 => 100755 plot/plot.c mode change 100644 => 100755 plot/plot.h mode change 100644 => 100755 plot/vrml.c mode change 100644 => 100755 plot/vrml.h mode change 100644 => 100755 plot/x3dom.css mode change 100644 => 100755 plot/x3dom.css.h mode change 100644 => 100755 plot/x3dom.js mode change 100644 => 100755 plot/x3dom.js.h (limited to 'plot') diff --git a/plot/Imakefile b/plot/Imakefile old mode 100644 new mode 100755 diff --git a/plot/Jamfile b/plot/Jamfile old mode 100644 new mode 100755 index 5468cd6..9ced816 --- a/plot/Jamfile +++ b/plot/Jamfile @@ -22,9 +22,6 @@ if $(UNIX) && $(OS) != MACOSX { ObjectHdrs plot : $(LibWinH) ; } -# Individual stand alone test of plot library -MainVariant plot : plot.c : : STANDALONE_TEST : ../h ../numlib ../spectro : : ../spectro/libconv.lib ../numlib/libnum.lib ../numlib/libui.lib ; - # VRML plot library Library libvrml : vrml.c : : : ../h ../icc ../cgats ../numlib ../gamut ; @@ -38,6 +35,10 @@ if [ GLOB $(PATH) : xxd xxd.exe ] { GenFileNNDnc x3dom.js.h : xxd -i "<" [ NormPaths x3dom.js ] ">" [ NormPaths x3dom.js.h ] ; } +# Individual stand alone test of plot library +LINKFLAGS += $(GUILINKFLAGS) ; +MainVariant plot : plot.c : : STANDALONE_TEST : ../h ../numlib ../spectro : : ../spectro/libconv.lib ../numlib/libnum.lib ../numlib/libui.lib ; + #MainsFromSources ttt.c : : : ../numlib ; #Main ttt : ttt.c : : : ../numlib : : ../numlib/libnum libplot : ; diff --git a/plot/License.txt b/plot/License.txt old mode 100644 new mode 100755 diff --git a/plot/Readme.txt b/plot/Readme.txt old mode 100644 new mode 100755 diff --git a/plot/X3DOM_LICENSE.txt b/plot/X3DOM_LICENSE.txt old mode 100644 new mode 100755 diff --git a/plot/afiles b/plot/afiles old mode 100644 new mode 100755 diff --git a/plot/plot.c b/plot/plot.c old mode 100644 new mode 100755 index d7b4799..be4d1cf --- a/plot/plot.c +++ b/plot/plot.c @@ -553,11 +553,13 @@ int zero /* Flag - make sure zero is in y range */ } /* Public routines */ -/* Plot up to 10 graphs + optional crosses. Wait for a key */ +/* Plot up to 10 graphs + optional crosses */ +/* if dowait > 0, wait for user key */ +/* if dowait < 0, wait for no seconds */ /* return 0 on success, -1 on error */ /* If n is -ve, reverse the X axis */ int -do_plot10p( +do_plot10pw( double *x, /* X coord */ double *y1, /* Black */ double *y2, /* Red */ @@ -571,7 +573,8 @@ double *y9, /* Grey */ double *y10,/* White */ int n, /* Number of values */ double *xp, double *yp, /* And crosses */ -int m) { +int m, +int dowait) { int i, j; double xmin, xmax, ymin, ymax; int nn = abs(n); @@ -588,8 +591,8 @@ int m) { yy[5] = y6; yy[6] = y7; yy[7] = y8; - yy[9] = y9; - yy[5] = y10; + yy[8] = y9; + yy[9] = y10; /* Determine min and max dimensions of plot */ xmin = ymin = 1e6; @@ -633,12 +636,34 @@ int m) { ymax += 0.5, ymin -= 0.5; return do_plot_imp(PLOTF_NONE, - xmin, xmax, ymin, ymax, 1.0, 1, + xmin, xmax, ymin, ymax, 1.0, dowait, x, NULL, yy, NULL, n, xp, yp, NULL, NULL, m, NULL, NULL, NULL, NULL, NULL, 0); } +/* Plot up to 10 graphs + optional crosses. Wait for a key */ +/* return 0 on success, -1 on error */ +/* If n is -ve, reverse the X axis */ +int +do_plot10p( +double *x, /* X coord */ +double *y1, /* Black */ +double *y2, /* Red */ +double *y3, /* Green */ +double *y4, /* Blue */ +double *y5, /* Yellow */ +double *y6, /* Purple */ +double *y7, /* Brown */ +double *y8, /* Orange */ +double *y9, /* Grey */ +double *y10,/* White */ +int n, /* Number of values */ +double *xp, double *yp, /* And crosses */ +int m) { + return do_plot10pw(x, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, n, xp, yp, m, 1); +} + /* Plot a bunch of vectors + optional crosses */ /* return 0 on success, -1 on error */ diff --git a/plot/plot.h b/plot/plot.h old mode 100644 new mode 100755 index b7d06f7..8e3db5e --- a/plot/plot.h +++ b/plot/plot.h @@ -53,7 +53,7 @@ int do_plot6p(double *x, double *y1, double *y2, double *y3, double *y4, double int n, double *x7, double *y7, int m); /* Public routines */ -/* Plot up to 10 graphs */ +/* Plot up to 10 graphs. Wait for a key */ /* return 0 on success, -1 on error */ /* Graph order is Black = Y1, Red = Y2, Green = Y3, Blue = Y4, Yellow = Y5, Purple = Y6 */ /* Brown = Y7, Orange = Y8, Grey = Y9, White = Y10 */ @@ -69,6 +69,15 @@ int do_plot10p(double *x, double *y1, double *y2, double *y3, double *y4, double double *y7, double *y8, double *y9, double *y10, int n, double *xp, double *yp, int m); +/* Plot up to 10 graphs + optional crosses */ +/* if dowait > 0, wait for user key */ +/* if dowait < 0, wait for no seconds */ +/* return 0 on success, -1 on error */ +/* If n is -ve, reverse the X axis */ +int do_plot10pw(double *x, double *y1, double *y2, double *y3, double *y4, double *y5, double *y6, + double *y7, double *y8, double *y9, double *y10, + int n, double *xp, double *yp, int m, int dowait); + /* Plot a bunch of vectors + points + optional colored points & notation */ /* return 0 on success, -1 on error */ /* Vectors are x1, y1 to x2, y2 with 'X' at x2, y2, */ diff --git a/plot/vrml.c b/plot/vrml.c old mode 100644 new mode 100755 index d56e62d..ebe69a9 --- a/plot/vrml.c +++ b/plot/vrml.c @@ -70,7 +70,8 @@ static void cs2xyz(vrml *s, double *out, double *in) { } /* Add a sphere at the given location, with transparency. */ -/* if col[] is NULL, use natural color. */ +/* If col[] is NULL, use natural color. */ +/* rad is in normalized delta E scale units */ /* Need to do this before or after start_line_set()/dd_vertex()/make_lines() ! */ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans, double rad) { double rgb[3], xyz[3]; @@ -97,7 +98,7 @@ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans fprintf(s->fp," Transform { translation %f %f %f\n", xyz[0], xyz[1], xyz[2]); fprintf(s->fp," children [\n"); fprintf(s->fp," Shape{\n"); - fprintf(s->fp," geometry Sphere { radius %f }\n", s->scale * rad); + fprintf(s->fp," geometry Sphere { radius %f }\n", rad); fprintf(s->fp," appearance Appearance { material Material { \n"); if (trans > 0.0) { fprintf(s->fp," transparency %f, \n",trans); @@ -119,7 +120,7 @@ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans fprintf(s->fp," \n", rgb[0], rgb[1], rgb[2]); } fprintf(s->fp," \n"); - fprintf(s->fp," \n",s->scale * rad); + fprintf(s->fp," \n",rad); fprintf(s->fp," \n"); fprintf(s->fp," \n"); } @@ -127,6 +128,7 @@ static void add_marker_trans(vrml *s, double pos[3], double col[3], double trans /* Add a sphere at the given location. */ /* if col[] is NULL, use natural color. */ +/* rad is in normalized delta E scale units */ /* Need to do this before or after start_line_set()/dd_vertex()/make_lines() ! */ /* (Hasn't been fixed to work in RGB space) */ static void add_marker(vrml *s, double pos[3], double col[3], double rad) { @@ -134,6 +136,7 @@ static void add_marker(vrml *s, double pos[3], double col[3], double rad) { } /* Add a cone marker to the plot. col == NULL for natural color */ +/* rad is in normalized delta E scale units */ /* Need to do this before or after start_line_set()/dd_vertex()/make_lines() ! */ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], double rad) { double rgb[3]; @@ -232,7 +235,7 @@ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], doubl fprintf(s->fp," translation %f %f %f\n",loc[1], loc[2], loc[0]); fprintf(s->fp," children [\n"); fprintf(s->fp," Shape { \n"); - fprintf(s->fp," geometry Cone { bottomRadius %f height %f }\n",s->scale * rad,len); + fprintf(s->fp," geometry Cone { bottomRadius %f height %f }\n",rad,len); fprintf(s->fp," appearance Appearance { material Material { diffuseColor %f %f %f } }\n",rgb[0],rgb[1],rgb[2]); fprintf(s->fp," } \n"); fprintf(s->fp," ]\n"); @@ -246,7 +249,7 @@ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], doubl fprintf(s->fp," \n"); fprintf(s->fp," \n", rgb[0], rgb[1], rgb[2]); fprintf(s->fp," \n"); - fprintf(s->fp," \n",s->scale * rad, len); + fprintf(s->fp," \n",rad, len); fprintf(s->fp," \n"); fprintf(s->fp," \n"); } @@ -254,6 +257,7 @@ static void add_cone(vrml *s, double pp0[3], double pp1[3], double col[3], doubl } /* Add a text marker to the plot. col == NULL for natural color */ +/* size is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ static void add_text(vrml *s, char *text, double p[3], double col[3], double size) { double rgb[3], xyz[3]; @@ -282,7 +286,7 @@ static void add_text(vrml *s, char *text, double p[3], double col[3], double siz fprintf(s->fp," Shape{\n"); fprintf(s->fp," geometry Text { string [\"%s\"]\n",text); fprintf(s->fp," fontStyle FontStyle { family \"SANS\" style \"BOLD\" size %f }\n", - s->scale * size); + size); fprintf(s->fp," }\n"); fprintf(s->fp," appearance Appearance { material Material "); fprintf(s->fp,"{ diffuseColor %f %f %f } }\n", rgb[0], rgb[1], rgb[2]); @@ -298,7 +302,7 @@ static void add_text(vrml *s, char *text, double p[3], double col[3], double siz fprintf(s->fp," \n", rgb[0], rgb[1], rgb[2]); fprintf(s->fp," \n"); fprintf(s->fp," \n",text); - fprintf(s->fp," \n", s->scale * size); + fprintf(s->fp," \n", size); fprintf(s->fp," \n"); fprintf(s->fp," \n"); fprintf(s->fp," \n"); @@ -1432,7 +1436,6 @@ double vdist s->off = 50.0; /* z axis offset */ } - /* Create filename with the right exension */ { char *xl = NULL; diff --git a/plot/vrml.h b/plot/vrml.h old mode 100644 new mode 100755 index d3c86c3..287c7e5 --- a/plot/vrml.h +++ b/plot/vrml.h @@ -103,17 +103,21 @@ struct _vrml { /* Add a spherical marker point to the plot. col == NULL for natural color */ + /* rad is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ void (*add_marker)(struct _vrml *s, double pos[3], double col[3], double rad); /* Add a spherical marker with transparency */ + /* rad is in normalized delta E scale units */ void (*add_marker_trans)(struct _vrml *s, double pos[3], double col[3], double trans, double rad); /* Add a cone marker to the plot. col == NULL for natural color */ + /* rad is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ void (*add_cone)(struct _vrml *s, double p0[3], double p1[3], double col[3], double rad); /* Add a text marker to the plot. col == NULL for natural color */ + /* size is in normalized delta E scale units */ /* (Need to do this before or after start_line_set()/dd_vertex()/make_lines() !) */ void (*add_text)(struct _vrml *s, char *text, double p[3], double col[3], double size); diff --git a/plot/x3dom.css b/plot/x3dom.css old mode 100644 new mode 100755 diff --git a/plot/x3dom.css.h b/plot/x3dom.css.h old mode 100644 new mode 100755 diff --git a/plot/x3dom.js b/plot/x3dom.js old mode 100644 new mode 100755 diff --git a/plot/x3dom.js.h b/plot/x3dom.js.h old mode 100644 new mode 100755 -- cgit v1.2.3