Plot/Draw
[libbn (numerical functions)]

Collaboration diagram for Plot/Draw:


Files

file  plot3.h
file  vectfont.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 brt(x, y)   (11*x+y)
#define drk(x, y)   -(11*x+y)
#define LAST   -128
 0200 Marks end of stroke list
#define NEGY   -127
 0201 Denotes negative y stroke
#define bneg(x, y)   NEGY, brt(x,y)
#define dneg(x, y)   NEGY, drk(x,y)
#define TINY   char
 must be signed
#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 x1, int y1, int x2, int y2)
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 x1, int y1, int x2, int y2)
void pl_box (FILE *plotfp, int x1, int y1, int x2, int y2)
void pl_color (FILE *plotfp, int r, int g, int b)
void pl_flush (FILE *plotfp)
void pl_3space (FILE *plotfp, int x1, int y1, int z1, int x2, int y2, int z2)
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 x1, int y1, int z1, int x2, int y2, int z2)
void pl_3box (FILE *plotfp, int x1, int y1, int z1, int x2, int y2, int z2)
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 x1, double y1, double x2, double y2)
void pd_circle (FILE *plotfp, double x, double y, double r)
void pd_arc (FILE *plotfp, double xc, double yc, double x1, double y1, double x2, double y2)
void pd_box (FILE *plotfp, double x1, double y1, double x2, double y2)
void pdv_3space (FILE *plotfp, const vect_t min, const vect_t max)
void pdv_3point (FILE *plotfp, const vect_t pt)
void pdv_3move (FILE *plotfp, const vect_t pt)
void pdv_3cont (FILE *plotfp, const vect_t pt)
void pdv_3line (FILE *plotfp, const vect_t a, const vect_t b)
void pdv_3box (FILE *plotfp, const vect_t a, const vect_t b)
void pd_3space (FILE *plotfp, double x1, double y1, double z1, double x2, double y2, double z2)
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 x1, double y1, double z1, double x2, double y2, double z2)
void pd_3box (FILE *plotfp, double x1, double y1, double z1, double x2, double y2, double z2)
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 f2list (FILE **fpp, float *x, float *y, int *n)
void tp_3list (FILE *fp, double *x, double *y, double *z, int npoints)
void f3list (FILE **fpp, float *x, float *y, float *z, int *n)
void tp_2mlist (FILE *fp, double *x, double *y, int npoints, int flag, int mark, int interval, double size)
void f2mlst (FILE **fp, float *x, float *y, int *np, int *flag, int *mark, int *interval, float *size)
void tp_2marker (FILE *fp, int c, double x, double y, double scale)
void f2mark (FILE **fp, int *c, float *x, float *y, float *scale)
void tp_3marker (FILE *fp, int c, double x, double y, double z, double scale)
void f3mark (FILE **fp, int *c, float *x, float *y, float *z, float *scale)
void tp_2number (FILE *fp, double input, int x, int y, int cscale, double theta, int digits)
void f2numb (FILE **fp, float *input, int *x, int *y, float *cscale, float *theta, int *digits)
void tp_scale (int idata[], int elements, int mode, int length, int odata[], double *min, double *dx)
void fscale (int idata[], int *elements, char *mode, int *length, int odata[], double *min, double *dx)
void tp_2symbol (FILE *fp, char *string, double x, double y, double scale, double theta)
void f2symb (FILE **fp, char *string, float *x, float *y, float *scale, float *theta)
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 fplot (FILE **fp, int *xp, int *yp, int *xl, int *yl, char *xtitle, char *ytitle, float *x, float *y, int *n, float *cscale)
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_3axis (FILE *fp, char *string, point_t origin, mat_t rot, double length, int ccw, int ndigits, double label_start, double label_incr, double tick_separation, double char_width)
void f3axis (FILE **fp, char *string, float *x, float *y, float *z, float *length, float *theta, int *ccw, int *ndigits, float *label_start, float *label_incr, float *tick_separation, float *char_width)
void tp_3symbol (FILE *fp, char *string, point_t origin, mat_t rot, double scale)
void tp_3vector (FILE *plotfp, point_t from, point_t to, double fromheadfract, double toheadfract)
void f3vect (FILE **fp, float *fx, float *fy, float *fz, float *tx, float *ty, float *tz, float *fl, float *tl)
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 x1, int y1, int x2, int y2)
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 x1, int y1, int x2, int y2)
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 x1, int y1, int x2, int y2)
void pl_box (register FILE *plotfp, int x1, int y1, int x2, int y2)
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 x1, int y1, int z1, int x2, int y2, int z2)
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 x1, int y1, int z1, int x2, int y2, int z2)
void pl_3box (register FILE *plotfp, int x1, int y1, int z1, int x2, int y2, int z2)
void pd_point (register FILE *plotfp, double x, double y)
void pd_line (register FILE *plotfp, double x1, double y1, double x2, double y2)
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 x1, double y1, double x2, double y2)
void pd_circle (register FILE *plotfp, double x, double y, double r)
void pd_arc (register FILE *plotfp, double xc, double yc, double x1, double y1, double x2, double y2)
void pd_box (register FILE *plotfp, double x1, double y1, double x2, double y2)
void pdv_3space (register FILE *plotfp, const fastf_t *min, const fastf_t *max)
void pd_3space (register FILE *plotfp, double x1, double y1, double z1, double x2, double y2, double z2)
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 x1, double y1, double z1, double x2, double y2, double z2)
void pdv_3box (register FILE *plotfp, const fastf_t *a, const fastf_t *b)
void pd_3box (register FILE *plotfp, double x1, double y1, double z1, double x2, double y2, double z2)
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

TINY * tp_cindex [256]
 index to stroke tokens
TINY tp_ctable []
 table of strokes

Define Documentation

#define pl_mat_idn (  _mat   )     MAT_IDN( _mat )
 

Definition at line 52 of file plot3.h.

#define pl_mat_zero (  _mat   )     MAT_ZERO( _mat )
 

Definition at line 53 of file plot3.h.

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

Definition at line 54 of file plot3.h.

#define PL_OUTPUT_MODE_BINARY   0
 

Definition at line 56 of file plot3.h.

Referenced by dgo_open_cmd(), dgo_set_uplotOutputMode_cmd(), pd_3cont(), pd_3line(), pd_3move(), pd_3point(), pd_3space(), pd_arc(), pd_circle(), pd_cont(), pd_line(), pd_move(), pd_point(), pd_space(), pdv_3cont(), pdv_3line(), pdv_3move(), pdv_3point(), pdv_3space(), pl_3cont(), pl_3line(), pl_3move(), pl_3point(), pl_3space(), pl_arc(), pl_circle(), pl_color(), pl_cont(), pl_erase(), pl_flush(), pl_label(), pl_line(), pl_linmod(), pl_move(), pl_point(), pl_space(), and rt_process_uplot_value().

#define PL_OUTPUT_MODE_TEXT   1
 

Definition at line 57 of file plot3.h.

Referenced by dgo_set_uplotOutputMode_cmd().

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

Definition at line 291 of file plot3.h.

Referenced by PL_FORTRAN().

#define brt (  x,
y   )     (11*x+y)
 

Definition at line 44 of file vectfont.h.

#define drk (  x,
y   )     -(11*x+y)
 

Definition at line 45 of file vectfont.h.

#define LAST   -128
 

0200 Marks end of stroke list

Definition at line 46 of file vectfont.h.

Referenced by bn_vlist_3string(), tp_3symbol(), and tp_setup().

#define NEGY   -127
 

0201 Denotes negative y stroke

Definition at line 47 of file vectfont.h.

Referenced by bn_vlist_3string(), and tp_3symbol().

#define bneg (  x,
y   )     NEGY, brt(x,y)
 

Definition at line 48 of file vectfont.h.

#define dneg (  x,
y   )     NEGY, drk(x,y)
 

Definition at line 49 of file vectfont.h.

#define TINY   char
 

must be signed

Definition at line 54 of file vectfont.h.

Referenced by bn_vlist_3string(), tp_3symbol(), and tp_setup().

#define TP_MARK   1
 

Definition at line 55 of file list.c.

Referenced by PL_FORTRAN(), and tp_2mlist().

#define TP_LINE   2
 

Definition at line 56 of file list.c.

Referenced by PL_FORTRAN(), and tp_2mlist().

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

Definition at line 71 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 77 of file tplot.c.

Referenced by tp_plot().

#define REF_WIDTH   0.857143
 

Definition at line 78 of file tplot.c.

#define NUM_DISTANCE   250
 

Definition at line 79 of file tplot.c.

Referenced by tp_plot().

#define LAB_LNGTH   860
 

Definition at line 80 of file tplot.c.

Referenced by tp_plot().


Function Documentation

int pl_getOutputMode (   ) 
 

Definition at line 79 of file plot3.c.

void pl_setOutputMode (  int  mode  ) 
 

Definition at line 84 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(), and nmg_pl_v().

void pl_space (  FILE *  plotfp,
int  x1,
int  y1,
int  x2,
int  y2
) 
 

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  x1,
int  y1,
int  x2,
int  y2
) 
 

Referenced by F().

void pl_box (  FILE *  plotfp,
int  x1,
int  y1,
int  x2,
int  y2
) 
 

Referenced by F().

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

Referenced by F(), interpolate_data(), main(), nmg_face_lu_plot(), nmg_pl_e(), nmg_pl_eu(), nmg_pl_hitmiss_list(), nmg_pl_v(), nmg_plot_lu_ray(), rt_dsp_norm(), rt_ebm_shot(), rt_nurb_setfile(), rt_plot_cell(), rt_plot_cut(), rt_plot_solid(), and rt_plot_vlblock().

void pl_flush (  FILE *  plotfp  ) 
 

Referenced by F().

void pl_3space (  FILE *  plotfp,
int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
) 
 

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  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
) 
 

Referenced by F().

void pl_3box (  FILE *  plotfp,
int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
) 
 

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  x1,
double  y1,
double  x2,
double  y2
) 
 

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  x1,
double  y1,
double  x2,
double  y2
) 
 

Referenced by F().

void pd_box (  FILE *  plotfp,
double  x1,
double  y1,
double  x2,
double  y2
) 
 

Referenced by F().

void pdv_3space (  FILE *  plotfp,
const vect_t  min,
const vect_t  max
) 
 

Referenced by nmg_pl_isect(), rt_plot_all_bboxes(), rt_plot_all_solids(), and rt_plot_cell().

void pdv_3point (  FILE *  plotfp,
const vect_t  pt
) 
 

Referenced by nmg_pl_v().

void pdv_3move (  FILE *  plotfp,
const vect_t  pt
) 
 

Referenced by nmg_pl_hitmiss_list(), nmg_pl_v(), pdv_3ray(), rt_3move_raydist(), rt_vlist_to_uplot(), tp_3axis(), tp_3symbol(), and tp_3vector().

void pdv_3cont (  FILE *  plotfp,
const vect_t  pt
) 
 

Referenced by nmg_pl_hitmiss_list(), pdv_3ray(), rt_3cont_raydist(), rt_vlist_to_uplot(), tp_3axis(), and tp_3vector().

void pdv_3line (  FILE *  plotfp,
const vect_t  a,
const vect_t  b
) 
 

Referenced by nmg_face_lu_plot(), nmg_pl_e(), nmg_pl_eu(), nmg_plot_lu_ray(), nmg_plot_ray_face(), rt_dsp_norm(), rt_ebm_shot(), and tp_3vector().

void pdv_3box (  FILE *  plotfp,
const vect_t  a,
const vect_t  b
) 
 

Referenced by rt_plot_all_bboxes(), and rt_plot_cell().

void pd_3space (  FILE *  plotfp,
double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2
) 
 

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
) 
 

Referenced by F(), main(), pd_3box(), pdv_3box(), PL_FORTRAN(), and tp_3list().

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

Referenced by F(), main(), pd_3box(), pdv_3box(), PL_FORTRAN(), and tp_3list().

void pd_3line (  FILE *  plotfp,
double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2
) 
 

Referenced by F(), and rt_plot_cut().

void pd_3box (  FILE *  plotfp,
double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2
) 
 

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 f2list (  FILE **  fpp,
float *  x,
float *  y,
int *  n
) 
 

Referenced by PL_FORTRAN().

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

void f3list (  FILE **  fpp,
float *  x,
float *  y,
float *  z,
int *  n
) 
 

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

void f2mlst (  FILE **  fp,
float *  x,
float *  y,
int *  np,
int *  flag,
int *  mark,
int *  interval,
float *  size
) 
 

void tp_2marker (  FILE *  fp,
int  c,
double  x,
double  y,
double  scale
) 
 

Referenced by PL_FORTRAN(), and tp_2mlist().

void f2mark (  FILE **  fp,
int *  c,
float *  x,
float *  y,
float *  scale
) 
 

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

Referenced by PL_FORTRAN().

void f3mark (  FILE **  fp,
int *  c,
float *  x,
float *  y,
float *  z,
float *  scale
) 
 

void tp_2number (  FILE *  fp,
double  input,
int  x,
int  y,
int  cscale,
double  theta,
int  digits
) 
 

void f2numb (  FILE **  fp,
float *  input,
int *  x,
int *  y,
float *  cscale,
float *  theta,
int *  digits
) 
 

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

Referenced by PL_FORTRAN().

void fscale (  int  idata[],
int *  elements,
char *  mode,
int *  length,
int  odata[],
double *  min,
double *  dx
) 
 

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

Definition at line 152 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 f2symb (  FILE **  fp,
char *  string,
float *  x,
float *  y,
float *  scale,
float *  theta
) 
 

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 fplot (  FILE **  fp,
int *  xp,
int *  yp,
int *  xl,
int *  yl,
char *  xtitle,
char *  ytitle,
float *  x,
float *  y,
int *  n,
float *  cscale
) 
 

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 231 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 332 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 397 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 448 of file tplot.c.

Referenced by tp_fixsc().

void tp_3axis (  FILE *  fp,
char *  string,
point_t  origin,
mat_t  rot,
double  length,
int  ccw,
int  ndigits,
double  label_start,
double  label_incr,
double  tick_separation,
double  char_width
) 
 

Referenced by PL_FORTRAN().

void f3axis (  FILE **  fp,
char *  string,
float *  x,
float *  y,
float *  z,
float *  length,
float *  theta,
int *  ccw,
int *  ndigits,
float *  label_start,
float *  label_incr,
float *  tick_separation,
float *  char_width
) 
 

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

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

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

Referenced by PL_FORTRAN().

void f3vect (  FILE **  fp,
float *  fx,
float *  fy,
float *  fz,
float *  tx,
float *  ty,
float *  tz,
float *  fl,
float *  tl
) 
 

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 67 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 90 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 105 of file list.c.

References fp, pd_cont(), and pd_move().

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
) 
 

Definition at line 126 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 137 of file list.c.

References fp, pd_3cont(), and pd_3move().

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 178 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 214 of file list.c.

References f2list(), flag, fp, PL_FORTRAN, size, tp_2marker(), TP_LINE, and TP_MARK.

Here is the call graph for this function:

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

plot a point

Definition at line 93 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_line (  register FILE *  plotfp,
int  x1,
int  y1,
int  x2,
int  y2
) 
 

Definition at line 105 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

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

Definition at line 119 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

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

Definition at line 132 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

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

Definition at line 144 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

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

Definition at line 156 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_space (  register FILE *  plotfp,
int  x1,
int  y1,
int  x2,
int  y2
) 
 

Definition at line 169 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_erase (  register FILE *  plotfp  ) 
 

Definition at line 183 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

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

Definition at line 192 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_arc (  register FILE *  plotfp,
int  xc,
int  yc,
int  x1,
int  y1,
int  x2,
int  y2
) 
 

Definition at line 205 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_box (  register FILE *  plotfp,
int  x1,
int  y1,
int  x2,
int  y2
) 
 

Definition at line 221 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
) 
 

Definition at line 237 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_flush (  register FILE *  plotfp  ) 
 

Definition at line 250 of file plot3.c.

References PL_OUTPUT_MODE_BINARY.

void pl_3space (  register FILE *  plotfp,
int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
) 
 

Definition at line 262 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 278 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 291 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 304 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3line (  register FILE *  plotfp,
int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
) 
 

Definition at line 317 of file plot3.c.

References PL_OUTPUT_MODE_BINARY, and putsi.

void pl_3box (  register FILE *  plotfp,
int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2
) 
 

Definition at line 333 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 364 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

void pd_line (  register FILE *  plotfp,
double  x1,
double  y1,
double  x2,
double  y2
) 
 

Definition at line 382 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 404 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 422 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

void pd_space (  register FILE *  plotfp,
double  x1,
double  y1,
double  x2,
double  y2
) 
 

Definition at line 440 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 460 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

void pd_arc (  register FILE *  plotfp,
double  xc,
double  yc,
double  x1,
double  y1,
double  x2,
double  y2
) 
 

Definition at line 479 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

void pd_box (  register FILE *  plotfp,
double  x1,
double  y1,
double  x2,
double  y2
) 
 

Definition at line 501 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 513 of file plot3.c.

References htond(), PL_OUTPUT_MODE_BINARY, and V3ARGS.

Here is the call graph for this function:

void pd_3space (  register FILE *  plotfp,
double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2
) 
 

Definition at line 529 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 551 of file plot3.c.

References htond(), PL_OUTPUT_MODE_BINARY, and V3ARGS.

Here is the call graph for this function:

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

Definition at line 566 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 585 of file plot3.c.

References htond(), PL_OUTPUT_MODE_BINARY, and V3ARGS.

Here is the call graph for this function:

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

Definition at line 600 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 619 of file plot3.c.

References htond(), PL_OUTPUT_MODE_BINARY, and V3ARGS.

Here is the call graph for this function:

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

Definition at line 634 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 653 of file plot3.c.

References htond(), PL_OUTPUT_MODE_BINARY, and V3ARGS.

Here is the call graph for this function:

void pd_3line (  register FILE *  plotfp,
double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2
) 
 

Definition at line 669 of file plot3.c.

References htond(), and PL_OUTPUT_MODE_BINARY.

Here is the call graph for this function:

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

Definition at line 691 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  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2
) 
 

Definition at line 718 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 748 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 116 of file scale.c.

void PL_FORTRAN (  fscale  ,
FSCALE 
) 
 

Definition at line 217 of file scale.c.

References 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 74 of file symbol.c.

References bn_mat_mul(), LAST, MAT4X3PNT, MAT_DELTAS, MAT_IDN, NEGY, NULL, pdv_3move(), TINY, tp_cindex, tp_setup(), VSET, X, Y, and Z.

Here is the call graph for this function:

void PL_FORTRAN (  f2symb  ,
F2SYMB 
) 
 

Definition at line 172 of file symbol.c.

References fp, and tp_2symbol().

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 102 of file tplot.c.

References 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 458 of file tplot.c.

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 68 of file vector.c.

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

Here is the call graph for this function:

void PL_FORTRAN (  f3vect  ,
F3VECT 
) 
 

Definition at line 120 of file vector.c.

References fp, tp_3vector(), and VSET.

Here is the call graph for this function:


Variable Documentation

TINY* tp_cindex[256]
 

index to stroke tokens

Definition at line 75 of file vectfont.c.

Referenced by bn_vlist_3string(), tp_3symbol(), and tp_setup().

TINY tp_ctable[]
 

table of strokes

Definition at line 105 of file vectfont.c.

Referenced by tp_setup().


Generated on Mon Sep 18 01:25:22 2006 for BRL-CAD by  doxygen 1.4.6