Plot/Draw
[libbn (numerical functions)]

Collaboration diagram for Plot/Draw:

Files

file  plot3.h
file  list.c
file  marker.c
file  plot3.c
 

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.


file  scale.c
 

scale geometry points.


file  symbol.c
file  tplot.c
 

This routine is designed to simplify the creation of X, Y plots for user.


file  vectfont.c
file  vector.c

Defines

#define pl_mat_idn(_mat)   MAT_IDN( _mat )
#define pl_mat_zero(_mat)   MAT_ZERO( _mat )
#define pl_mat_copy(_mat1, _mat2)   MAT_COPY( _mat1, _mat2 )
#define PL_OUTPUT_MODE_BINARY   0
#define PL_OUTPUT_MODE_TEXT   1
#define PL_FORTRAN(lc, uc)   BU_FORTRAN(lc, uc)
#define TP_MARK   1
#define TP_LINE   2
#define putsi(a)   putc(a, plotfp); putc((a>>8), plotfp)
#define TIC   100
#define REF_WIDTH   0.857143
#define NUM_DISTANCE   250
#define LAB_LNGTH   860

Functions

int pl_getOutputMode ()
void pl_setOutputMode (int mode)
void pl_point (FILE *plotfp, int x, int y)
void pl_line (FILE *plotfp, int fx, int fy, int tx, int ty)
void pl_linmod (FILE *plotfp, char *s)
void pl_move (FILE *plotfp, int x, int y)
void pl_cont (FILE *plotfp, int x, int y)
void pl_label (FILE *plotfp, char *s)
void pl_space (FILE *plotfp, int x_1, int y_1, int x_2, int y_2)
void pl_erase (FILE *plotfp)
void pl_circle (FILE *plotfp, int x, int y, int r)
void pl_arc (FILE *plotfp, int xc, int yc, int x_1, int y_1, int x_2, int y_2)
void pl_box (FILE *plotfp, int x_1, int y_1, int x_2, int y_2)
void pl_color (FILE *plotfp, int r, int g, int b)
void pl_flush (FILE *plotfp)
void pl_3space (FILE *plotfp, int x_1, int y_1, int z_1, int x_2, int y_2, int z_2)
void pl_3point (FILE *plotfp, int x, int y, int z)
void pl_3move (FILE *plotfp, int x, int y, int z)
void pl_3cont (FILE *plotfp, int x, int y, int z)
void pl_3line (FILE *plotfp, int x_1, int y_1, int z_1, int x_2, int y_2, int z_2)
void pl_3box (FILE *plotfp, int x_1, int y_1, int z_1, int x_2, int y_2, int z_2)
void pd_point (FILE *plotfp, double x, double y)
void pd_line (FILE *plotfp, double fx, double fy, double tx, double ty)
void pd_move (FILE *plotfp, double x, double y)
void pd_cont (FILE *plotfp, double x, double y)
void pd_space (FILE *plotfp, double x_1, double y_1, double x_2, double y_2)
void pd_circle (FILE *plotfp, double x, double y, double r)
void pd_arc (FILE *plotfp, double xc, double yc, double x_1, double y_1, double x_2, double y_2)
void pd_box (FILE *plotfp, double x_1, double y_1, double x_2, double y_2)
void pd_3space (FILE *plotfp, double x_1, double y_1, double z_1, double x_2, double y_2, double z_2)
void pd_3point (FILE *plotfp, double x, double y, double z)
void pd_3move (FILE *plotfp, double x, double y, double z)
void pd_3cont (FILE *plotfp, double x, double y, double z)
void pd_3line (FILE *plotfp, double x_1, double y_1, double z_1, double x_2, double y_2, double z_2)
void pd_3box (FILE *plotfp, double x_1, double y_1, double z_1, double x_2, double y_2, double z_2)
void pdv_3ray (FILE *fp, const point_t pt, const vect_t dir, double t)
void tp_i2list (FILE *fp, int *x, int *y, int npoints)
void tp_2list (FILE *fp, double *x, double *y, int npoints)
void BU_FORTRAN (f2list, F2LIST)(FILE **fpp
void tp_3list (FILE *fp, double *x, double *y, double *z, int npoints)
void BU_FORTRAN (f3list, F3LIST)(FILE **fpp
void tp_2mlist (FILE *fp, double *x, double *y, int npoints, int flag, int mark, int interval, double size)
void BU_FORTRAN (f2mlst, F2MLST)(FILE **fp
void tp_2marker (FILE *fp, int c, double x, double y, double scale)
void BU_FORTRAN (f2mark, F2MARK)(FILE **fp
void tp_3marker (FILE *fp, int c, double x, double y, double z, double scale)
void BU_FORTRAN (f3mark, F3MARK)(FILE **fp
void tp_2number (FILE *fp, double input, int x, int y, int cscale, double theta, int digits)
void BU_FORTRAN (f2numb, F2NUMB)(FILE **fp
void tp_scale (int idata[], int elements, int mode, int length, int odata[], double *min, double *dx)
void BU_FORTRAN (fscale, FSCALE)(int idata[]
void tp_2symbol (FILE *fp, char *string, double x, double y, double scale, double theta)
void BU_FORTRAN (f2symb, F2SYMB)(FILE **fp
void tp_plot (FILE *fp, int xp, int yp, int xl, int yl, char xtitle[], char ytitle[], float x[], float y[], int n, double cscale)
void BU_FORTRAN (fplot, FPLOT)(FILE **fp
void tp_ftoa (float x, char *s)
 This routine converts a floating point number into a string of ascii characters of the form "sX.XXXesXX". The string is null terminated.
void tp_fixsc (float *x, int npts, float size, float *xs, float *xmin, float *xmax, float *dx)
void tp_sep (float x, float *coef, int *ex)
 tp_sep() divides a floating point number into a coefficient and an exponent. works in base ten.
double tp_ipow (double x, int n)
 tp_ipow() raises a floating point number to a positve integer power. XXX Horribly inefficient!
void tp_i2list (register FILE *fp, register int *x, register int *y, register int npoints)
void tp_2list (register FILE *fp, register double *x, register double *y, register int npoints)
void PL_FORTRAN (f2list, F2LIST)
void tp_3list (FILE *fp, register double *x, register double *y, register double *z, register int npoints)
void PL_FORTRAN (f3list, F3LIST)
void tp_2mlist (FILE *fp, register double *x, register double *y, int npoints, int flag, int mark, int interval, double size)
void PL_FORTRAN (f2mlst, F2MLST)
void pl_point (register FILE *plotfp, int x, int y)
 plot a point
void pl_line (register FILE *plotfp, int px1, int py1, int px2, int py2)
void pl_linmod (register FILE *plotfp, register char *s)
void pl_move (register FILE *plotfp, int x, int y)
void pl_cont (register FILE *plotfp, int x, int y)
void pl_label (register FILE *plotfp, register char *s)
void pl_space (register FILE *plotfp, int px1, int py1, int px2, int py2)
void pl_erase (register FILE *plotfp)
void pl_circle (register FILE *plotfp, int x, int y, int r)
void pl_arc (register FILE *plotfp, int xc, int yc, int px1, int py1, int px2, int py2)
void pl_box (register FILE *plotfp, int px1, int py1, int px2, int py2)
void pl_color (register FILE *plotfp, int r, int g, int b)
void pl_flush (register FILE *plotfp)
void pl_3space (register FILE *plotfp, int px1, int py1, int pz1, int px2, int py2, int pz2)
void pl_3point (register FILE *plotfp, int x, int y, int z)
void pl_3move (register FILE *plotfp, int x, int y, int z)
void pl_3cont (register FILE *plotfp, int x, int y, int z)
void pl_3line (register FILE *plotfp, int px1, int py1, int pz1, int px2, int py2, int pz2)
void pl_3box (register FILE *plotfp, int px1, int py1, int pz1, int px2, int py2, int pz2)
void pd_point (register FILE *plotfp, double x, double y)
void pd_line (register FILE *plotfp, double px1, double py1, double px2, double py2)
void pd_move (register FILE *plotfp, double x, double y)
void pd_cont (register FILE *plotfp, double x, double y)
void pd_space (register FILE *plotfp, double px1, double py1, double px2, double py2)
void pd_circle (register FILE *plotfp, double x, double y, double r)
void pd_arc (register FILE *plotfp, double xc, double yc, double px1, double py1, double px2, double py2)
void pd_box (register FILE *plotfp, double px1, double py1, double px2, double py2)
void pdv_3space (register FILE *plotfp, const fastf_t *min, const fastf_t *max)
void pd_3space (register FILE *plotfp, double px1, double py1, double pz1, double px2, double py2, double pz2)
void pdv_3point (register FILE *plotfp, const fastf_t *pt)
void pd_3point (register FILE *plotfp, double x, double y, double z)
void pdv_3move (register FILE *plotfp, const fastf_t *pt)
void pd_3move (register FILE *plotfp, double x, double y, double z)
void pdv_3cont (register FILE *plotfp, const fastf_t *pt)
void pd_3cont (register FILE *plotfp, double x, double y, double z)
void pdv_3line (register FILE *plotfp, const fastf_t *a, const fastf_t *b)
void pd_3line (register FILE *plotfp, double px1, double py1, double pz1, double px2, double py2, double pz2)
void pdv_3box (register FILE *plotfp, const fastf_t *a, const fastf_t *b)
void pd_3box (register FILE *plotfp, double px1, double py1, double pz1, double px2, double py2, double pz2)
void pdv_3ray (FILE *fp, const fastf_t *pt, const fastf_t *dir, double t)
void tp_scale (int *idata, int elements, register int mode, int length, int *odata, double *min, double *dx)
 This routine is intended to take an array of data points as input (either integer, floating, or double), and scale it to fit in a space of LENGTH units.
void PL_FORTRAN (fscale, FSCALE)
void tp_3symbol (FILE *fp, char *string, fastf_t *origin, fastf_t *rot, double scale)
void PL_FORTRAN (f2symb, F2SYMB)
void tp_plot (FILE *fp, int xp, int yp, int xl, int yl, char *xtitle, char *ytitle, float *x, float *y, int n, double cscale)
void PL_FORTRAN (fplot, FPLOT)
void tp_3vector (FILE *plotfp, fastf_t *from, fastf_t *to, double fromheadfract, double toheadfract)
 Draw a vector between points "from" and "to", with the option of having an arrowhead on either or both ends.
void PL_FORTRAN (f3vect, F3VECT)

Variables

void float * x
void float float * y
void float float int * n
void float float float * z
void float float int * np
void float float int int * flag
void float float int int int * mark
void float float int int int int * interval
void float float int int int
int float * 
size
void int * c
void int float float float * scale
void float * input
void float int int float * cscale
void float int int float float * theta
void float int int float float
int * 
digits
void int * elements
void int char * mode
void int char int * length
void int char int int odata []
void int char int int double * min
void int char int int double
double * 
dx
void char * string
void int * xp
void int int * yp
void int int int * xl
void int int int int * yl
void int int int int char * xtitle
void int int int int char char * ytitle

Detailed Description


Define Documentation

#define pl_mat_idn ( _mat   )     MAT_IDN( _mat )

Definition at line 42 of file plot3.h.

#define pl_mat_zero ( _mat   )     MAT_ZERO( _mat )

Definition at line 43 of file plot3.h.

#define pl_mat_copy ( _mat1,
_mat2   )     MAT_COPY( _mat1, _mat2 )

Definition at line 44 of file plot3.h.

#define PL_OUTPUT_MODE_BINARY   0
#define PL_OUTPUT_MODE_TEXT   1

Definition at line 47 of file plot3.h.

#define PL_FORTRAN ( lc,
uc   )     BU_FORTRAN(lc, uc)

Definition at line 239 of file plot3.h.

Referenced by PL_FORTRAN().

#define TP_MARK   1

Draw marks

Definition at line 37 of file list.c.

Referenced by PL_FORTRAN(), and tp_2mlist().

#define TP_LINE   2

Draw lines

Definition at line 38 of file list.c.

Referenced by PL_FORTRAN(), and tp_2mlist().

#define putsi (  )     putc(a, plotfp); putc((a>>8), plotfp)

For the sake of efficiency, we trust putc() to write only one byte

Definition at line 78 of file plot3.c.

Referenced by pl_3cont(), pl_3line(), pl_3move(), pl_3point(), pl_3space(), pl_arc(), pl_circle(), pl_cont(), pl_line(), pl_move(), pl_point(), and pl_space().

#define TIC   100

Definition at line 71 of file tplot.c.

Referenced by tp_plot().

#define REF_WIDTH   0.857143

Definition at line 72 of file tplot.c.

#define NUM_DISTANCE   250

Definition at line 73 of file tplot.c.

Referenced by tp_plot().

#define LAB_LNGTH   860

Definition at line 74 of file tplot.c.

Referenced by tp_plot().


Function Documentation

int pl_getOutputMode (  ) 

Definition at line 86 of file plot3.c.

void pl_setOutputMode ( int  mode  ) 

Definition at line 91 of file plot3.c.

void pl_point ( FILE *  plotfp,
int  x,
int  y 
)

Referenced by F().

void pl_line ( FILE *  plotfp,
int  fx,
int  fy,
int  tx,
int  ty 
)

Referenced by F(), and tp_plot().

void pl_linmod ( FILE *  plotfp,
char *  s 
)

Referenced by F().

void pl_move ( FILE *  plotfp,
int  x,
int  y 
)

Referenced by F(), pl_box(), tp_i2list(), and tp_plot().

void pl_cont ( FILE *  plotfp,
int  x,
int  y 
)

Referenced by F(), pl_box(), tp_i2list(), and tp_plot().

void pl_label ( FILE *  plotfp,
char *  s 
)

Referenced by F().

void pl_space ( FILE *  plotfp,
int  x_1,
int  y_1,
int  x_2,
int  y_2 
)

Referenced by F().

void pl_erase ( FILE *  plotfp  ) 

Referenced by F().

void pl_circle ( FILE *  plotfp,
int  x,
int  y,
int  r 
)

Referenced by F().

void pl_arc ( FILE *  plotfp,
int  xc,
int  yc,
int  x_1,
int  y_1,
int  x_2,
int  y_2 
)

Referenced by F().

void pl_box ( FILE *  plotfp,
int  x_1,
int  y_1,
int  x_2,
int  y_2 
)

Referenced by F().

void pl_color ( FILE *  plotfp,
int  r,
int  g,
int  b 
)

Referenced by F().

void pl_flush ( FILE *  plotfp  ) 

Referenced by F().

void pl_3space ( FILE *  plotfp,
int  x_1,
int  y_1,
int  z_1,
int  x_2,
int  y_2,
int  z_2 
)

Referenced by F().

void pl_3point ( FILE *  plotfp,
int  x,
int  y,
int  z 
)

Referenced by F().

void pl_3move ( FILE *  plotfp,
int  x,
int  y,
int  z 
)

Referenced by F(), and pl_3box().

void pl_3cont ( FILE *  plotfp,
int  x,
int  y,
int  z 
)

Referenced by F(), and pl_3box().

void pl_3line ( FILE *  plotfp,
int  x_1,
int  y_1,
int  z_1,
int  x_2,
int  y_2,
int  z_2 
)

Referenced by F().

void pl_3box ( FILE *  plotfp,
int  x_1,
int  y_1,
int  z_1,
int  x_2,
int  y_2,
int  z_2 
)

Referenced by F().

void pd_point ( FILE *  plotfp,
double  x,
double  y 
)

Referenced by F().

void pd_line ( FILE *  plotfp,
double  fx,
double  fy,
double  tx,
double  ty 
)

Referenced by F().

void pd_move ( FILE *  plotfp,
double  x,
double  y 
)

Referenced by F(), pd_box(), PL_FORTRAN(), and tp_2list().

void pd_cont ( FILE *  plotfp,
double  x,
double  y 
)

Referenced by F(), pd_box(), PL_FORTRAN(), and tp_2list().

void pd_space ( FILE *  plotfp,
double  x_1,
double  y_1,
double  x_2,
double  y_2 
)

Referenced by F().

void pd_circle ( FILE *  plotfp,
double  x,
double  y,
double  r 
)

Referenced by F().

void pd_arc ( FILE *  plotfp,
double  xc,
double  yc,
double  x_1,
double  y_1,
double  x_2,
double  y_2 
)

Referenced by F().

void pd_box ( FILE *  plotfp,
double  x_1,
double  y_1,
double  x_2,
double  y_2 
)

Referenced by F().

void pd_3space ( FILE *  plotfp,
double  x_1,
double  y_1,
double  z_1,
double  x_2,
double  y_2,
double  z_2 
)

Referenced by F().

void pd_3point ( FILE *  plotfp,
double  x,
double  y,
double  z 
)

Referenced by F().

void pd_3move ( FILE *  plotfp,
double  x,
double  y,
double  z 
)
void pd_3cont ( FILE *  plotfp,
double  x,
double  y,
double  z 
)
void pd_3line ( FILE *  plotfp,
double  x_1,
double  y_1,
double  z_1,
double  x_2,
double  y_2,
double  z_2 
)

Referenced by F().

void pd_3box ( FILE *  plotfp,
double  x_1,
double  y_1,
double  z_1,
double  x_2,
double  y_2,
double  z_2 
)

Referenced by F().

void pdv_3ray ( FILE *  fp,
const point_t  pt,
const vect_t  dir,
double  t 
)
void tp_i2list ( FILE *  fp,
int *  x,
int *  y,
int  npoints 
)

Referenced by tp_plot().

void tp_2list ( FILE *  fp,
double *  x,
double *  y,
int  npoints 
)

Referenced by tp_2mlist().

void BU_FORTRAN ( f2list  ,
F2LIST   
)
void tp_3list ( FILE *  fp,
double *  x,
double *  y,
double *  z,
int  npoints 
)
void BU_FORTRAN ( f3list  ,
F3LIST   
)
void tp_2mlist ( FILE *  fp,
double *  x,
double *  y,
int  npoints,
int  flag,
int  mark,
int  interval,
double  size 
)
void BU_FORTRAN ( f2mlst  ,
F2MLST   
)
void tp_2marker ( FILE *  fp,
int  c,
double  x,
double  y,
double  scale 
)

Referenced by PL_FORTRAN(), and tp_2mlist().

void BU_FORTRAN ( f2mark  ,
F2MARK   
)
void tp_3marker ( FILE *  fp,
int  c,
double  x,
double  y,
double  z,
double  scale 
)

Referenced by PL_FORTRAN().

void BU_FORTRAN ( f3mark  ,
F3MARK   
)
void tp_2number ( FILE *  fp,
double  input,
int  x,
int  y,
int  cscale,
double  theta,
int  digits 
)
void BU_FORTRAN ( f2numb  ,
F2NUMB   
)
void tp_scale ( int  idata[],
int  elements,
int  mode,
int  length,
int  odata[],
double *  min,
double *  dx 
)

Referenced by PL_FORTRAN().

void BU_FORTRAN ( fscale  ,
FSCALE   
)
void tp_2symbol ( FILE *  fp,
char *  string,
double  x,
double  y,
double  scale,
double  theta 
)

Definition at line 131 of file symbol.c.

References bn_mat_angles(), tp_3symbol(), and VSET.

Referenced by PL_FORTRAN(), tp_2marker(), and tp_plot().

Here is the call graph for this function:

void BU_FORTRAN ( f2symb  ,
F2SYMB   
)
void tp_plot ( FILE *  fp,
int  xp,
int  yp,
int  xl,
int  yl,
char  xtitle[],
char  ytitle[],
float  x[],
float  y[],
int  n,
double  cscale 
)

Referenced by PL_FORTRAN().

void BU_FORTRAN ( fplot  ,
FPLOT   
)
void tp_ftoa ( float  x,
char *  s 
)

This routine converts a floating point number into a string of ascii characters of the form "sX.XXXesXX". The string is null terminated.

T P _ F T O A

Definition at line 368 of file tplot.c.

References tp_sep().

Here is the call graph for this function:

void tp_fixsc ( float *  x,
int  npts,
float  size,
float *  xs,
float *  xmin,
float *  xmax,
float *  dx 
)

T P _ F I X S C

tp_fixsc is a scaling routine intended to be used in conjunction with plotting routines. What tp_fixsc does is scale the user supplied data so that it fits on a specified axis and has 'nice' numbers for labels.

Calling sequence

tp_fixsc(x, npts, size, xs, xmin, xmax, dx) where

Parameters:
x[] the data array to be scaled
npts the number of elements in x[]
size the length into which x[] is supposed to be fitted (in inches)
xs the returned scale facter to integer space
xmin the new minimum value for the data array (a returned value)
xmax the new maximum value for the data array (a returned value)
dx the value in data units between tic marks (a returned value)

Definition at line 166 of file tplot.c.

References tp_ipow(), and tp_sep().

Referenced by tp_plot().

Here is the call graph for this function:

void tp_sep ( float  x,
float *  coef,
int *  ex 
)

tp_sep() divides a floating point number into a coefficient and an exponent. works in base ten.

T P _ S E P

Definition at line 83 of file tplot.c.

Referenced by tp_fixsc(), and tp_ftoa().

double tp_ipow ( double  x,
int  n 
)

tp_ipow() raises a floating point number to a positve integer power. XXX Horribly inefficient!

T P _ I P O W

Definition at line 134 of file tplot.c.

Referenced by tp_fixsc().

void tp_i2list ( register FILE *  fp,
register int *  x,
register int *  y,
register int  npoints 
)

T P _ I 2 L I S T

Take a set of x, y coordinates, and plot them as a polyline, ie, connect them with line segments. For markers, use tp_mlist(), below. This "C" interface expects arrays of INTs.

Definition at line 49 of file list.c.

References pl_cont(), and pl_move().

Here is the call graph for this function:

void tp_2list ( register FILE *  fp,
register double *  x,
register double *  y,
register int  npoints 
)

T P _ 2 L I S T

Take a set of x, y coordinates, and plot them as a polyline, ie, connect them with line segments. For markers, use tp_mlist(), below. This "C" interface expects arrays of DOUBLES.

Definition at line 73 of file list.c.

References pd_cont(), and pd_move().

Here is the call graph for this function:

void PL_FORTRAN ( f2list  ,
F2LIST   
)

Definition at line 89 of file list.c.

References n, pd_cont(), pd_move(), x, and y.

Here is the call graph for this function:

void tp_3list ( FILE *  fp,
register double *  x,
register double *  y,
register double *  z,
register int  npoints 
)

T P _ 3 L I S T

Definition at line 107 of file list.c.

References pd_3cont(), and pd_3move().

Here is the call graph for this function:

void PL_FORTRAN ( f3list  ,
F3LIST   
)

Definition at line 119 of file list.c.

References n, pd_3cont(), pd_3move(), x, y, and z.

Here is the call graph for this function:

void tp_2mlist ( FILE *  fp,
register double *  x,
register double *  y,
int  npoints,
int  flag,
int  mark,
int  interval,
double  size 
)

T P _ 2 M L I S T

Take a set of x, y co-ordinates and plots them, with a combination of connecting lines and/or place markers. It is important to note that the arrays are arrays of doubles, and express UNIX-plot coordinates in the current pl_space().

tp_scale(TIG) may be called first to optionally re-scale the data.

The 'mark' character to be used for marking points off can be any printing ASCII character, or 001 to 005 for the special marker characters.

In addition, the value of the 'flag' variable determines the type of line to be drawn, as follows:

  • 0 Draw nothing (rather silly)
  • 1 Marks only, no connecting lines. Suggested interval=1.
  • 2 Draw connecting lines only.
  • 3 Draw line and marks

Definition at line 156 of file list.c.

References tp_2list(), tp_2marker(), TP_LINE, and TP_MARK.

Here is the call graph for this function:

void PL_FORTRAN ( f2mlst  ,
F2MLST   
)

This FORTRAN interface expects arrays of REALs (single precision).

Definition at line 193 of file list.c.

References flag, interval, mark, np, PL_FORTRAN, size, tp_2marker(), TP_LINE, TP_MARK, x, and y.

Here is the call graph for this function:

void pl_point ( register FILE *  plotfp,
int  x,
int  y 
)

plot a point

Definition at line 100 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_line ( register FILE *  plotfp,
int  px1,
int  py1,
int  px2,
int  py2 
)

Definition at line 112 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_linmod ( register FILE *  plotfp,
register char *  s 
)

Definition at line 126 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_move ( register FILE *  plotfp,
int  x,
int  y 
)

Definition at line 139 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_cont ( register FILE *  plotfp,
int  x,
int  y 
)

Definition at line 151 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_label ( register FILE *  plotfp,
register char *  s 
)

Definition at line 163 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_space ( register FILE *  plotfp,
int  px1,
int  py1,
int  px2,
int  py2 
)

Definition at line 176 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_erase ( register FILE *  plotfp  ) 

Definition at line 190 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_circle ( register FILE *  plotfp,
int  x,
int  y,
int  r 
)

Definition at line 199 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_arc ( register FILE *  plotfp,
int  xc,
int  yc,
int  px1,
int  py1,
int  px2,
int  py2 
)

Definition at line 212 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_box ( register FILE *  plotfp,
int  px1,
int  py1,
int  px2,
int  py2 
)

Definition at line 228 of file plot3.c.

References pl_cont(), and pl_move().

Here is the call graph for this function:

void pl_color ( register FILE *  plotfp,
int  r,
int  g,
int  b 
)

Warning: r, g, b are ints. The output is chars.

Definition at line 244 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_flush ( register FILE *  plotfp  ) 

Definition at line 257 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_3space ( register FILE *  plotfp,
int  px1,
int  py1,
int  pz1,
int  px2,
int  py2,
int  pz2 
)

Definition at line 269 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3point ( register FILE *  plotfp,
int  x,
int  y,
int  z 
)

Definition at line 285 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3move ( register FILE *  plotfp,
int  x,
int  y,
int  z 
)

Definition at line 298 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3cont ( register FILE *  plotfp,
int  x,
int  y,
int  z 
)

Definition at line 311 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3line ( register FILE *  plotfp,
int  px1,
int  py1,
int  pz1,
int  px2,
int  py2,
int  pz2 
)

Definition at line 324 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3box ( register FILE *  plotfp,
int  px1,
int  py1,
int  pz1,
int  px2,
int  py2,
int  pz2 
)

Definition at line 340 of file plot3.c.

References pl_3cont(), and pl_3move().

Here is the call graph for this function:

void pd_point ( register FILE *  plotfp,
double  x,
double  y 
)

Definition at line 371 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_line ( register FILE *  plotfp,
double  px1,
double  py1,
double  px2,
double  py2 
)

Definition at line 393 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_move ( register FILE *  plotfp,
double  x,
double  y 
)

Note: no pd_linmod(), just use pl_linmod()

Definition at line 419 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_cont ( register FILE *  plotfp,
double  x,
double  y 
)

Definition at line 441 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_space ( register FILE *  plotfp,
double  px1,
double  py1,
double  px2,
double  py2 
)

Definition at line 463 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_circle ( register FILE *  plotfp,
double  x,
double  y,
double  r 
)

Definition at line 487 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_arc ( register FILE *  plotfp,
double  xc,
double  yc,
double  px1,
double  py1,
double  px2,
double  py2 
)

Definition at line 510 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pd_box ( register FILE *  plotfp,
double  px1,
double  py1,
double  px2,
double  py2 
)

Definition at line 536 of file plot3.c.

References pd_cont(), and pd_move().

Here is the call graph for this function:

void pdv_3space ( register FILE *  plotfp,
const fastf_t *  min,
const fastf_t *  max 
)

Definition at line 548 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and V3ARGS.

void pd_3space ( register FILE *  plotfp,
double  px1,
double  py1,
double  pz1,
double  px2,
double  py2,
double  pz2 
)

Definition at line 568 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pdv_3point ( register FILE *  plotfp,
const fastf_t *  pt 
)

Definition at line 594 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and V3ARGS.

void pd_3point ( register FILE *  plotfp,
double  x,
double  y,
double  z 
)

Definition at line 613 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pdv_3move ( register FILE *  plotfp,
const fastf_t *  pt 
)

Definition at line 636 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and V3ARGS.

Referenced by pdv_3ray(), tp_3axis(), tp_3symbol(), and tp_3vector().

void pd_3move ( register FILE *  plotfp,
double  x,
double  y,
double  z 
)

Definition at line 655 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pdv_3cont ( register FILE *  plotfp,
const fastf_t *  pt 
)

Definition at line 678 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and V3ARGS.

Referenced by pdv_3ray(), tp_3axis(), tp_3symbol(), and tp_3vector().

void pd_3cont ( register FILE *  plotfp,
double  x,
double  y,
double  z 
)

Definition at line 697 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pdv_3line ( register FILE *  plotfp,
const fastf_t *  a,
const fastf_t *  b 
)

Definition at line 720 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and V3ARGS.

Referenced by tp_3vector().

void pd_3line ( register FILE *  plotfp,
double  px1,
double  py1,
double  pz1,
double  px2,
double  py2,
double  pz2 
)

Definition at line 740 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pdv_3box ( register FILE *  plotfp,
const fastf_t *  a,
const fastf_t *  b 
)

Definition at line 766 of file plot3.c.

References pd_3cont(), pd_3move(), X, Y, and Z.

Here is the call graph for this function:

void pd_3box ( register FILE *  plotfp,
double  px1,
double  py1,
double  pz1,
double  px2,
double  py2,
double  pz2 
)

Definition at line 793 of file plot3.c.

References pd_3cont(), and pd_3move().

Here is the call graph for this function:

void pdv_3ray ( FILE *  fp,
const fastf_t *  pt,
const fastf_t *  dir,
double  t 
)

Draw a ray

Definition at line 823 of file plot3.c.

References pdv_3cont(), pdv_3move(), and VJOIN1.

Here is the call graph for this function:

void tp_scale ( int *  idata,
int  elements,
register int  mode,
int  length,
int *  odata,
double *  min,
double *  dx 
)

This routine is intended to take an array of data points as input (either integer, floating, or double), and scale it to fit in a space of LENGTH units.

An output array is returned which contains the scaled information stored in 16-bit integers. The input and output arrays may overlap, as the input will never occupy more space than the output. Also output are the minimum value encountered (MIN), and a delta factor showing the increase in value each XXXX. This DX factor is rounded to 1, 2, 4, 5, 8, or 10 to produce nicer looking axes.

Parameters:
[in] idata This pointer contains the address of the input array to be scaled. Actual type of array is determined by MODE parameter.
[in] elements Number of elements in IDATA to be used.
[in] mode Specifies type of data that IDATA points to; should be one of: 'd' - double precision 'f' - float (single precision) 'i' - integer
[in] length Contains the length (in 1/1000ths of an inch) of the region in which the data is to be scaled into. Note that the actual amount of space needed may be this value rounded up to the next inch.
[out] odata This pointer contains the address of the output array, which will always be of integer type.
[out] min This pointer contains the address of the location for minimum point found to be placed in.
dx This pointer addresses the delta value of the data which corresponds to the width of EACH tick. This implies that:

  1. This is exactly the number to divide raw data by to scale it to this scale (ex: 2 graphs with one scale factor)
  2. When this value is fed to the AXIS routine, it must be multiplied by 1000.0 first (to specify increment between one INCH ticks).

The fact that this routine returns variables of type DOUBLE has important implications for FORTRAN users. These variables must be declared of type DOUBLE PRECISION to reserve enough space.

Definition at line 98 of file scale.c.

References x.

void PL_FORTRAN ( fscale  ,
FSCALE   
)

FORTRAN Interface

Definition at line 198 of file scale.c.

References dx, elements, length, min, mode, odata, and tp_scale().

Here is the call graph for this function:

void tp_3symbol ( FILE *  fp,
char *  string,
fastf_t *  origin,
fastf_t *  rot,
double  scale 
)

Definition at line 53 of file symbol.c.

References bn_mat_mul(), MAT4X3PNT, MAT_DELTAS_VEC, MAT_IDN, pdv_3cont(), pdv_3move(), tp_cindex, tp_setup(), and VSET.

Referenced by tp_2symbol(), tp_3axis(), and tp_3marker().

Here is the call graph for this function:

void PL_FORTRAN ( f2symb  ,
F2SYMB   
)

Definition at line 151 of file symbol.c.

References scale, theta, tp_2symbol(), x, and y.

Here is the call graph for this function:

void tp_plot ( FILE *  fp,
int  xp,
int  yp,
int  xl,
int  yl,
char *  xtitle,
char *  ytitle,
float *  x,
float *  y,
int  n,
double  cscale 
)
Parameters:
fp file pointer
xtitle title for the x axis
ytitle title for the y axis
xp is the x page point desired to be (0, 0) for plot
yp is the y page point desired to be (0, 0) for plot
xl is the length of the x axis
yl is the length of the y axis
n is the number of points
cscale is the character scale factor
x the x data
y the y data

Definition at line 239 of file tplot.c.

References dx, LAB_LNGTH, NUM_DISTANCE, pl_cont(), pl_line(), pl_move(), TIC, tp_2symbol(), tp_fixsc(), and tp_i2list().

Here is the call graph for this function:

void PL_FORTRAN ( fplot  ,
FPLOT   
)

FORTRAN Interface Entry

Definition at line 447 of file tplot.c.

References cscale, n, tp_plot(), x, xl, xp, xtitle, y, yl, yp, and ytitle.

Here is the call graph for this function:

void tp_3vector ( FILE *  plotfp,
fastf_t *  from,
fastf_t *  to,
double  fromheadfract,
double  toheadfract 
)

Draw a vector between points "from" and "to", with the option of having an arrowhead on either or both ends.

T P _ 3 V E C T O R The fromheadfract and toheadfract values indicate the length of the arrowheads relative to the length of the vector to-from. A typical value is 0.1, making the head 10% of the size of the vector. The sign of the "fract" values indicates the pointing direction. Positive points towards the "to" point, negative points towards "from". Upon return, the virtual pen is left at the "to" position.

Definition at line 50 of file vector.c.

References bn_vec_ortho(), MAGNITUDE, pdv_3cont(), pdv_3line(), pdv_3move(), VADD3, VCROSS, VSCALE, VSUB2, and ZERO.

Referenced by PL_FORTRAN().

Here is the call graph for this function:

void PL_FORTRAN ( f3vect  ,
F3VECT   
)

Definition at line 102 of file vector.c.

References tp_3vector(), and VSET.

Here is the call graph for this function:


Variable Documentation

void int int int int char char float * x
void int int int int char char float float * y
void int int int int char char float float int * n
void int float float float * z

Definition at line 259 of file plot3.h.

Referenced by bn_mat_inverse(), bn_mat_lookat(), bn_noise_perlin(), bn_noise_vec(), F(), and PL_FORTRAN().

void float float int* np

Definition at line 272 of file plot3.h.

Referenced by PL_FORTRAN().

void float float int int* flag

Definition at line 272 of file plot3.h.

Referenced by PL_FORTRAN().

void float float int int int* mark

Definition at line 272 of file plot3.h.

Referenced by PL_FORTRAN().

void float float int int int int* interval

Definition at line 272 of file plot3.h.

Referenced by PL_FORTRAN().

void float float int int int int float* size

Definition at line 272 of file plot3.h.

Referenced by PL_FORTRAN().

void int * c

Definition at line 285 of file plot3.h.

Referenced by bn_mat_inverse(), bn_math_cmd(), main(), mat2d_inverse(), PL_FORTRAN(), and pl_strncpy().

void char float float float * scale
void float* input

Definition at line 309 of file plot3.h.

void int int int int char char float float int float * cscale

Definition at line 309 of file plot3.h.

Referenced by PL_FORTRAN().

void char float float float float * theta

Definition at line 309 of file plot3.h.

Referenced by PL_FORTRAN(), quat_exp(), and quat_log().

void float int int float float int* digits

Definition at line 309 of file plot3.h.

void int* elements

Definition at line 324 of file plot3.h.

Referenced by PL_FORTRAN().

void int char* mode

Definition at line 324 of file plot3.h.

Referenced by PL_FORTRAN().

void int char int* length

Definition at line 324 of file plot3.h.

Referenced by PL_FORTRAN().

void int char int int odata[]

Definition at line 324 of file plot3.h.

Referenced by PL_FORTRAN().

void int char int int double* min

Definition at line 324 of file plot3.h.

Referenced by F(), and PL_FORTRAN().

void int char int int double double* dx

Definition at line 324 of file plot3.h.

Referenced by anim_dirn2mat(), PL_FORTRAN(), and tp_plot().

void char* string

Definition at line 337 of file plot3.h.

void int* xp

Definition at line 354 of file plot3.h.

Referenced by PL_FORTRAN().

void int int* yp

Definition at line 354 of file plot3.h.

Referenced by PL_FORTRAN().

void int int int* xl

Definition at line 354 of file plot3.h.

Referenced by PL_FORTRAN().

void int int int int* yl

Definition at line 354 of file plot3.h.

Referenced by PL_FORTRAN().

void int int int int char* xtitle

Definition at line 354 of file plot3.h.

Referenced by PL_FORTRAN().

void int int int int char char* ytitle

Definition at line 354 of file plot3.h.

Referenced by PL_FORTRAN().

Generated on Tue Dec 11 13:14:29 2012 for LIBBN by  doxygen 1.6.3