Path-like objects comprise polygons with a fixed number of vertices (lines, triangles, quadrilaterals) and objects built from them (including coordinate axes, grids, and arrows); curves with a variable number of points (ellipses, arcs, splines); and plots of functions of one variable.
Fixed-data polygons are drawn with high-level commands.
line(p1, p2); triangle(p1, p2, p3); quad(p1, p2, p3, p4); rect(p1, p2); // coordinate rectangle spline(p1, p2, p3); // quad spline with control pts spline(p1, p2, p3, p4); // cubic splineA line() accepts an optional numerical argument that acts as an expansion parameter: line(p1,p2,t); draws a segment with midpoint at the midpoint of p1 and p2, but having length scaled by
Internally, ePiX marks paths as closed or not; triangles, quadrilaterals, polygons, ellipses, and arrows are closed. If a solid, closed path is drawn while filling is active, the path is filled with the current shade of gray. If filling is deactivated, the path is drawn but not filled. Dashed and dotted paths cannot be filled in one step; instead, fill the solid path, then draw the dashed/dotted boundary.
The shade of gray is a number between 0 (white) and 1 (black), and defaults to 0.3. Shading is opaque in PostScript, so the order of figure elements is significant in the input file when filling is active.
Color filling is available only through PSTricks. The features of PSTricks that are relatively well-supported in ePiX are illustrated in the sample file contour.xp. In principle, any PSTricks features can be obtained through raw output. However, this approach is generally discouraged since, for example, PSTricks color declarations are not recognized by eepic, and vice-versa. The Next Generation of ePiX will work more seamlessly with PSTricks.
Elliptical arcs are specified by their center, a pair of vectors, an angular range, and an optional number of points:
ellipse(ctr, v1, v2, t_min, t_max, n);uses
![]() |
The circular arc parallel to the -plane, having center
and radius
, and subtending the angle (counterclockwise, in current
angle units) from
to
is drawn with
arc(p1, r, theta1, theta2); arc_arrow(p1, r, theta1, theta2); // same, with arrowheadIf