bounding_box(P(x_min, y_min), P(x_max, y_max));
picture(P(h_size, v_size));
offset(P(h_offset, v_offset));
unitlength("1pt");
begin();
In an actual file, numbers are used, but the variables listed above
are assigned values when these functions are called. offset is
zero by default, hence optional. In unitlength the quoted
argument is a floating point number followed by a two-letter LATEX length. begin sets the variables x_size
and
y_size
, the width and height of the bounding box.
Entire sections of a figure may be drawn with LATEX thicklines by delimiting the corresponding portion of the
input file with bold(); and end_bold();
An
arrow inside a bold environment is not the same as
a boldarrow, but plot-type objects behave as expected in
their bold versions.
ePiX provides color output via the pstcol or color packages, and can generate essentially arbitrary colors, using either the subtractive red-green-blue model (rgb, better for displaying) or the additive cyan-magenta-yellow-black model (cmyk, better for printing). An rgb color is determined by three floating-point densities between 0 (no color) and 1 (full saturation). Red, green, and blue are, respectively:
rgb(1,0,0); rgb(0,1,0); rgb(0,0,1);
A cmyk color is similarly specified by four
floats. Densities outside the range are ``clipped''. ePiX truncates color densities to 2 decimal places; if you need finer
control, modify the functions rgb and cmyk
in outputs.cc.
These color specifiers are declarations, and remain in force until
superceded. The scope of a color declaration is ended with a call to
black(); The six ``elementary'' colors can be called and
ended by name, e.g., red(); and end_red();
Colors will not appear if the file is previewed in xdvi, but will appear if you use laps to process your LATEX files, then view the Postscript with (say) gv.
viewpoint(viewpt1, viewpt2, viewpt3);
V(x1, x2, x3);
ePiX does orthogonal perspective drawing. The viewpoint of a
figure is a vector onto whose orthogonal complement certain
plot objects are projected. The overall scale of viewpoint
is immaterial, e.g., and
are identical, while
reverses the orientation of the figure. If
viewpoint is not parallel to the
axis, then the
axis is
drawn vertically; otherwise the figure is drawn in ``standard''
Cartesian form, regardless of
. By default, viewpoint is
the zero vector, hence optional. The viewpoint may be changed
anywhere in a source file. Using red and cyan together with slightly
different viewpoints can be used to give a 3D-glasses effect.
The function V produces a pair from an ordered triple. In polygons, arrows, splines, and ellipses, and in positioning labels, objects' location may be specified in terms of triples. There is a separate function for 3-d curve plotting, see below.