axis.c File Reference

This routine is used to generate an axis for a graph. It draws an axis with a linear scale, places tic marks every inch, labels the tics, and uses the supplied title for the axis. More...

#include "common.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "vmath.h"
#include "plot3.h"
Include dependency graph for axis.c:

Go to the source code of this file.

Defines

#define TICK_YLEN   (char_width)
 tick is 1 character height
#define NUM_YOFF   (3*char_width)
 numbers offset from line
#define TITLE_YOFF   (5*char_width)
 title offset from line

Functions

void tp_3axis (FILE *fp, char *string, fastf_t *origin, fastf_t *rot, double length, int ccw, int ndigits, double label_start, double label_incr, double tick_separation, double char_width)
void PL_FORTRAN (f3axis, F3AXIS)

Detailed Description

This routine is used to generate an axis for a graph. It draws an axis with a linear scale, places tic marks every inch, labels the tics, and uses the supplied title for the axis.

The strategy behind this routine is to split the axis into SEGMENTS, which run from one tick to the next. The origin of the first segment (x, y), the origin of the bottom of the first tick (xbott, ybott), and the origin of the first tick label (xnum, ynum) are computed along with the delta x and delta y (xincr, yincr) which describes the interval to the start of the next tick.

Originally written on August 01, 1978

Definition in file axis.c.


Define Documentation

#define TICK_YLEN   (char_width)

tick is 1 character height

Definition at line 51 of file axis.c.

Referenced by tp_3axis().

#define NUM_YOFF   (3*char_width)

numbers offset from line

Definition at line 52 of file axis.c.

Referenced by tp_3axis().

#define TITLE_YOFF   (5*char_width)

title offset from line

Definition at line 53 of file axis.c.

Referenced by tp_3axis().


Function Documentation

void tp_3axis ( FILE *  fp,
char *  string,
fastf_t *  origin,
fastf_t *  rot,
double  length,
int  ccw,
int  ndigits,
double  label_start,
double  label_incr,
double  tick_separation,
double  char_width 
)
Parameters:
fp output file
string label for axis
origin simple 3d point
rot rotation angle
length length of axis
ccw 0=clockwise, !0=counter clockwise (ccw)
ndigits # digits wide
label_start label starting value
label_incr label increment between ticks
tick_separation plot distance between ticks
char_width character scale (size)

Definition at line 56 of file axis.c.

References bn_mat_mul(), MAT4X3PNT, MAT4X3VEC, MAT_DELTAS_VEC, MAT_IDN, NUM_YOFF, pdv_3cont(), pdv_3move(), TICK_YLEN, TITLE_YOFF, tp_3symbol(), VADD2, VDOT, VJOIN1, VMOVE, VSCALE, VSET, VSUB2, X, and ZERO.

Referenced by PL_FORTRAN().

Here is the call graph for this function:

void PL_FORTRAN ( f3axis  ,
F3AXIS   
)

character scale (size)

Definition at line 174 of file axis.c.

References bn_mat_angles(), length, MAT_IDN, theta, tp_3axis(), VSET, x, y, and z.

Here is the call graph for this function:

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