BRL-CAD
|
A public-domain UNIX plot library, for 2-D and 3-D plotting in 16-bit VAX signed integer spaces, or 64-bit IEEE floating point. More...
Files | |
file | plot3.h |
Functions | |
PLOT3_EXPORT void | pl_setOutputMode (int mode) |
PLOT3_EXPORT void | pl_point (FILE *plotfp, int x, int y) |
PLOT3_EXPORT void | pl_line (FILE *plotfp, int fx, int fy, int tx, int ty) |
PLOT3_EXPORT void | pl_linmod (FILE *plotfp, const char *s) |
PLOT3_EXPORT void | pl_move (FILE *plotfp, int x, int y) |
PLOT3_EXPORT void | pl_cont (FILE *plotfp, int x, int y) |
PLOT3_EXPORT void | pl_label (FILE *plotfp, const char *s) |
PLOT3_EXPORT void | pl_space (FILE *plotfp, int x_1, int y_1, int x_2, int y_2) |
PLOT3_EXPORT void | pl_erase (FILE *plotfp) |
PLOT3_EXPORT void | pl_circle (FILE *plotfp, int x, int y, int r) |
PLOT3_EXPORT void | pl_arc (FILE *plotfp, int xc, int yc, int x_1, int y_1, int x_2, int y_2) |
PLOT3_EXPORT void | pl_box (FILE *plotfp, int x_1, int y_1, int x_2, int y_2) |
PLOT3_EXPORT void | pl_color (FILE *plotfp, int r, int g, int b) |
PLOT3_EXPORT void | pl_color_buc (FILE *plotfp, struct bu_color *c) |
PLOT3_EXPORT void | pl_flush (FILE *plotfp) |
PLOT3_EXPORT void | pl_3space (FILE *plotfp, int x_1, int y_1, int z_1, int x_2, int y_2, int z_2) |
PLOT3_EXPORT void | pl_3point (FILE *plotfp, int x, int y, int z) |
PLOT3_EXPORT void | pl_3move (FILE *plotfp, int x, int y, int z) |
PLOT3_EXPORT void | pl_3cont (FILE *plotfp, int x, int y, int z) |
PLOT3_EXPORT void | pl_3line (FILE *plotfp, int x_1, int y_1, int z_1, int x_2, int y_2, int z_2) |
PLOT3_EXPORT void | pl_3box (FILE *plotfp, int x_1, int y_1, int z_1, int x_2, int y_2, int z_2) |
PLOT3_EXPORT void | pd_point (FILE *plotfp, double x, double y) |
PLOT3_EXPORT void | pd_line (FILE *plotfp, double fx, double fy, double tx, double ty) |
PLOT3_EXPORT void | pd_move (FILE *plotfp, double x, double y) |
PLOT3_EXPORT void | pd_cont (FILE *plotfp, double x, double y) |
PLOT3_EXPORT void | pd_space (FILE *plotfp, double x_1, double y_1, double x_2, double y_2) |
PLOT3_EXPORT void | pd_circle (FILE *plotfp, double x, double y, double r) |
PLOT3_EXPORT void | pd_arc (FILE *plotfp, double xc, double yc, double x_1, double y_1, double x_2, double y_2) |
PLOT3_EXPORT void | pd_box (FILE *plotfp, double x_1, double y_1, double x_2, double y_2) |
PLOT3_EXPORT void | pd_3space (FILE *plotfp, double x_1, double y_1, double z_1, double x_2, double y_2, double z_2) |
PLOT3_EXPORT void | pd_3point (FILE *plotfp, double x, double y, double z) |
PLOT3_EXPORT void | pd_3move (FILE *plotfp, double x, double y, double z) |
PLOT3_EXPORT void | pd_3cont (FILE *plotfp, double x, double y, double z) |
PLOT3_EXPORT void | pd_3line (FILE *plotfp, double x_1, double y_1, double z_1, double x_2, double y_2, double z_2) |
PLOT3_EXPORT void | pd_3box (FILE *plotfp, double x_1, double y_1, double z_1, double x_2, double y_2, double z_2) |
PLOT3_EXPORT void | pdv_3ray (FILE *fp, const point_t pt, const vect_t dir, double t) |
PLOT3_EXPORT int | plot3_invalid (FILE *fp, int mode) |
A public-domain UNIX plot library, for 2-D and 3-D plotting in 16-bit VAX signed integer spaces, or 64-bit IEEE floating point.
These routines generate "UNIX plot" output (with the addition of 3-D commands). They behave almost exactly like the regular libplot routines, except:
The 3-D extensions are those of Doug Gwyn, from his System V extensions.
These are the ascii command letters allocated to various actions. Care has been taken to consistently match lowercase and uppercase letters.
The calling sequence is the same as the original Bell Labs routines, with the exception of the pl_ prefix on the name.
NOTE: from libbv's perspective, plot3.h is a stand-alone header that does not use any other library functionality. To use this header without libbv, define PLOT3_IMPLEMENTATION before including the plot3.h header.
Of interest: the Plan 9 sources (recently MIT licensed) appear to be related to the original code that would have formed the conceptual basis for these routines:
https://plan9.io/sources/plan9/sys/src/cmd/plot/libplot/
Don't know if there would be any improvements that could be retrofitted onto this version, but might be worth looking. In particular, curious if the spline routine might be useful...
PLOT3_EXPORT int pl_getOutputMode PL_ADD_PREFIX(pl_getOutputMode) |
#define PL_CONCAT | ( | a, | |
b | |||
) | PL_CONCAT2(a,b) |
#define PL_ADD_PREFIX | ( | b | ) | PL_CONCAT(PLOT_PREFIX_STR,b) |
#define pd_3box PL_ADD_PREFIX(pd_3box) |
#define pd_3cont PL_ADD_PREFIX(pd_3cont) |
#define pd_3line PL_ADD_PREFIX(pd_3line) |
#define pd_3move PL_ADD_PREFIX(pd_3move) |
#define pd_3point PL_ADD_PREFIX(pd_3point) |
#define pd_3space PL_ADD_PREFIX(pd_3space) |
#define pd_arc PL_ADD_PREFIX(pd_arc) |
#define pd_box PL_ADD_PREFIX(pd_box) |
#define pd_circle PL_ADD_PREFIX(pd_circle) |
#define pd_cont PL_ADD_PREFIX(pd_cont) |
#define pd_line PL_ADD_PREFIX(pd_line) |
#define pd_move PL_ADD_PREFIX(pd_move) |
#define pd_point PL_ADD_PREFIX(pd_point) |
#define pd_space PL_ADD_PREFIX(pd_space) |
#define pdv_3box PL_ADD_PREFIX(pdv_3box) |
#define pdv_3cont PL_ADD_PREFIX(pdv_3cont) |
#define pdv_3line PL_ADD_PREFIX(pdv_3line) |
#define pdv_3move PL_ADD_PREFIX(pdv_3move) |
#define pdv_3point PL_ADD_PREFIX(pdv_3point) |
#define pdv_3ray PL_ADD_PREFIX(pdv_3ray) |
#define pdv_3space PL_ADD_PREFIX(pdv_3space) |
#define pl_3box PL_ADD_PREFIX(pl_3box) |
#define pl_3cont PL_ADD_PREFIX(pl_3cont) |
#define pl_3line PL_ADD_PREFIX(pl_3line) |
#define pl_3move PL_ADD_PREFIX(pl_3move) |
#define pl_3point PL_ADD_PREFIX(pl_3point) |
#define pl_3space PL_ADD_PREFIX(pl_3space) |
#define pl_arc PL_ADD_PREFIX(pl_arc) |
#define pl_box PL_ADD_PREFIX(pl_box) |
#define pl_circle PL_ADD_PREFIX(pl_circle) |
#define pl_color PL_ADD_PREFIX(pl_color) |
#define pl_color_buc PL_ADD_PREFIX(pl_color_buc) |
#define pl_cont PL_ADD_PREFIX(pl_cont) |
#define pl_erase PL_ADD_PREFIX(pl_erase) |
#define pl_flush PL_ADD_PREFIX(pl_flush) |
#define pl_label PL_ADD_PREFIX(pl_label) |
#define pl_line PL_ADD_PREFIX(pl_line) |
#define pl_linmod PL_ADD_PREFIX(pl_linmod) |
#define pl_move PL_ADD_PREFIX(pl_move) |
#define pl_point PL_ADD_PREFIX(pl_point) |
#define pl_setOutputMode PL_ADD_PREFIX(pl_setOutputMode) |
#define pl_space PL_ADD_PREFIX(pl_space) |
#define plot3_invalid PL_ADD_PREFIX(plot3_invalid) |
PLOT3_EXPORT void pl_setOutputMode | ( | int | mode | ) |
PLOT3_EXPORT void pl_point | ( | FILE * | plotfp, |
int | x, | ||
int | y | ||
) |
PLOT3_EXPORT void pl_line | ( | FILE * | plotfp, |
int | fx, | ||
int | fy, | ||
int | tx, | ||
int | ty | ||
) |
PLOT3_EXPORT void pl_linmod | ( | FILE * | plotfp, |
const char * | s | ||
) |
PLOT3_EXPORT void pl_move | ( | FILE * | plotfp, |
int | x, | ||
int | y | ||
) |
PLOT3_EXPORT void pl_cont | ( | FILE * | plotfp, |
int | x, | ||
int | y | ||
) |
PLOT3_EXPORT void pl_label | ( | FILE * | plotfp, |
const char * | s | ||
) |
PLOT3_EXPORT void pl_space | ( | FILE * | plotfp, |
int | x_1, | ||
int | y_1, | ||
int | x_2, | ||
int | y_2 | ||
) |
PLOT3_EXPORT void pl_erase | ( | FILE * | plotfp | ) |
PLOT3_EXPORT void pl_circle | ( | FILE * | plotfp, |
int | x, | ||
int | y, | ||
int | r | ||
) |
PLOT3_EXPORT void pl_arc | ( | FILE * | plotfp, |
int | xc, | ||
int | yc, | ||
int | x_1, | ||
int | y_1, | ||
int | x_2, | ||
int | y_2 | ||
) |
PLOT3_EXPORT void pl_box | ( | FILE * | plotfp, |
int | x_1, | ||
int | y_1, | ||
int | x_2, | ||
int | y_2 | ||
) |
PLOT3_EXPORT void pl_color | ( | FILE * | plotfp, |
int | r, | ||
int | g, | ||
int | b | ||
) |
PLOT3_EXPORT void pl_color_buc | ( | FILE * | plotfp, |
struct bu_color * | c | ||
) |
PLOT3_EXPORT void pl_flush | ( | FILE * | plotfp | ) |
PLOT3_EXPORT void pl_3space | ( | FILE * | plotfp, |
int | x_1, | ||
int | y_1, | ||
int | z_1, | ||
int | x_2, | ||
int | y_2, | ||
int | z_2 | ||
) |
PLOT3_EXPORT void pl_3point | ( | FILE * | plotfp, |
int | x, | ||
int | y, | ||
int | z | ||
) |
PLOT3_EXPORT void pl_3move | ( | FILE * | plotfp, |
int | x, | ||
int | y, | ||
int | z | ||
) |
PLOT3_EXPORT void pl_3cont | ( | FILE * | plotfp, |
int | x, | ||
int | y, | ||
int | z | ||
) |
PLOT3_EXPORT void pl_3line | ( | FILE * | plotfp, |
int | x_1, | ||
int | y_1, | ||
int | z_1, | ||
int | x_2, | ||
int | y_2, | ||
int | z_2 | ||
) |
PLOT3_EXPORT void pl_3box | ( | FILE * | plotfp, |
int | x_1, | ||
int | y_1, | ||
int | z_1, | ||
int | x_2, | ||
int | y_2, | ||
int | z_2 | ||
) |
PLOT3_EXPORT void pd_point | ( | FILE * | plotfp, |
double | x, | ||
double | y | ||
) |
PLOT3_EXPORT void pd_line | ( | FILE * | plotfp, |
double | fx, | ||
double | fy, | ||
double | tx, | ||
double | ty | ||
) |
PLOT3_EXPORT void pd_move | ( | FILE * | plotfp, |
double | x, | ||
double | y | ||
) |
PLOT3_EXPORT void pd_cont | ( | FILE * | plotfp, |
double | x, | ||
double | y | ||
) |
PLOT3_EXPORT void pd_space | ( | FILE * | plotfp, |
double | x_1, | ||
double | y_1, | ||
double | x_2, | ||
double | y_2 | ||
) |
PLOT3_EXPORT void pd_circle | ( | FILE * | plotfp, |
double | x, | ||
double | y, | ||
double | r | ||
) |
PLOT3_EXPORT void pd_arc | ( | FILE * | plotfp, |
double | xc, | ||
double | yc, | ||
double | x_1, | ||
double | y_1, | ||
double | x_2, | ||
double | y_2 | ||
) |
PLOT3_EXPORT void pd_box | ( | FILE * | plotfp, |
double | x_1, | ||
double | y_1, | ||
double | x_2, | ||
double | y_2 | ||
) |
PLOT3_EXPORT void pd_3space | ( | FILE * | plotfp, |
double | x_1, | ||
double | y_1, | ||
double | z_1, | ||
double | x_2, | ||
double | y_2, | ||
double | z_2 | ||
) |
PLOT3_EXPORT void pd_3point | ( | FILE * | plotfp, |
double | x, | ||
double | y, | ||
double | z | ||
) |
PLOT3_EXPORT void pd_3move | ( | FILE * | plotfp, |
double | x, | ||
double | y, | ||
double | z | ||
) |
PLOT3_EXPORT void pd_3cont | ( | FILE * | plotfp, |
double | x, | ||
double | y, | ||
double | z | ||
) |
PLOT3_EXPORT void pd_3line | ( | FILE * | plotfp, |
double | x_1, | ||
double | y_1, | ||
double | z_1, | ||
double | x_2, | ||
double | y_2, | ||
double | z_2 | ||
) |
PLOT3_EXPORT void pd_3box | ( | FILE * | plotfp, |
double | x_1, | ||
double | y_1, | ||
double | z_1, | ||
double | x_2, | ||
double | y_2, | ||
double | z_2 | ||
) |
PLOT3_EXPORT void pdv_3ray | ( | FILE * | fp, |
const point_t | pt, | ||
const vect_t | dir, | ||
double | t | ||
) |
PLOT3_EXPORT int plot3_invalid | ( | FILE * | fp, |
int | mode | ||
) |