diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-11-25 10:16:00 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-11-25 10:16:00 +0100 |
commit | f6b8e0eae4374f339487a33e3e4fe5462d5816e1 (patch) | |
tree | 5f5f764fd6cda404b2ad6e85762c03fce3a335db /plot | |
parent | 615ab5513e79c4abc5bbe5c993587785b6a1738b (diff) |
New upstream version 2.0.0upstream/2.0.0
Diffstat (limited to 'plot')
-rwxr-xr-x[-rw-r--r--] | plot/Imakefile | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/Jamfile | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/License.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/Readme.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/X3DOM_LICENSE.txt | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/afiles | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/plot.c | 37 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/plot.h | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/vrml.c | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/vrml.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.css | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.css.h | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.js | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | plot/x3dom.js.h | 0 |
14 files changed, 60 insertions, 18 deletions
diff --git a/plot/Imakefile b/plot/Imakefile index 316b296..316b296 100644..100755 --- a/plot/Imakefile +++ b/plot/Imakefile diff --git a/plot/Jamfile b/plot/Jamfile index 5468cd6..9ced816 100644..100755 --- 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 index a871fcf..a871fcf 100644..100755 --- a/plot/License.txt +++ b/plot/License.txt diff --git a/plot/Readme.txt b/plot/Readme.txt index 6d15a37..6d15a37 100644..100755 --- a/plot/Readme.txt +++ b/plot/Readme.txt diff --git a/plot/X3DOM_LICENSE.txt b/plot/X3DOM_LICENSE.txt index d9c2faf..d9c2faf 100644..100755 --- a/plot/X3DOM_LICENSE.txt +++ b/plot/X3DOM_LICENSE.txt diff --git a/plot/afiles b/plot/afiles index 9e3f888..9e3f888 100644..100755 --- a/plot/afiles +++ b/plot/afiles diff --git a/plot/plot.c b/plot/plot.c index d7b4799..be4d1cf 100644..100755 --- 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 index b7d06f7..8e3db5e 100644..100755 --- 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 index d56e62d..ebe69a9 100644..100755 --- 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," <Material diffuseColor='%f %f %f'></Material>\n", rgb[0], rgb[1], rgb[2]); } fprintf(s->fp," </Appearance>\n"); - fprintf(s->fp," <Sphere radius='%f'></Sphere>\n",s->scale * rad); + fprintf(s->fp," <Sphere radius='%f'></Sphere>\n",rad); fprintf(s->fp," </Shape>\n"); fprintf(s->fp," </Transform>\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," <Appearance>\n"); fprintf(s->fp," <Material diffuseColor='%f %f %f'></Material>\n", rgb[0], rgb[1], rgb[2]); fprintf(s->fp," </Appearance>\n"); - fprintf(s->fp," <Cone bottomRadius='%f' height='%f'></Cone>\n",s->scale * rad, len); + fprintf(s->fp," <Cone bottomRadius='%f' height='%f'></Cone>\n",rad, len); fprintf(s->fp," </Shape>\n"); fprintf(s->fp," </Transform>\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," <Material diffuseColor='%f %f %f'></Material>\n", rgb[0], rgb[1], rgb[2]); fprintf(s->fp," </Appearance>\n"); fprintf(s->fp," <Text string='\"%s\"'>\n",text); - fprintf(s->fp," <FontStyle family='\"SANS\"' style='BOLD' size='%f'></FontStyle>\n", s->scale * size); + fprintf(s->fp," <FontStyle family='\"SANS\"' style='BOLD' size='%f'></FontStyle>\n", size); fprintf(s->fp," </Text>\n"); fprintf(s->fp," </Shape>\n"); fprintf(s->fp," </Transform>\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 index d3c86c3..287c7e5 100644..100755 --- 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 index c92109d..c92109d 100644..100755 --- a/plot/x3dom.css +++ b/plot/x3dom.css diff --git a/plot/x3dom.css.h b/plot/x3dom.css.h index d10fb9b..d10fb9b 100644..100755 --- a/plot/x3dom.css.h +++ b/plot/x3dom.css.h diff --git a/plot/x3dom.js b/plot/x3dom.js index 5744b3c..5744b3c 100644..100755 --- a/plot/x3dom.js +++ b/plot/x3dom.js diff --git a/plot/x3dom.js.h b/plot/x3dom.js.h index 11ea311..11ea311 100644..100755 --- a/plot/x3dom.js.h +++ b/plot/x3dom.js.h |