The commands of the previous section create data structures but do not write any output. Each type (other than P) is drawn with ``object-oriented'' syntax. For example, if C1 is a circle, then the command C1.draw() draws the circle. The effect of drawing a plane or sphere is described in Chapter 3. ePiX also provides high-level commands that draw polygons, curves, and compound objects, such as arrows and coordinate axes. Drawing commands must come in the body of the file, after begin().
line(P p1, P p2); triangle(P p1, P p2, P p3); // vertices specified rect(P p1, P p2); // coord rect w/opposite corners quad(P p1, P p2, P p3, P p4); // arbitrary quadrilateral spline(P p1, P p2, P p3); // quad/cubic splines given spline(P p1, P p2, P p3, P p4); // by control points arc(P center, radius, t_min, t_max); ellipse(P ctr, P v1, P v2, [t_min], [t_max], [int n]);The arguments of rect must lie in a plane parallel to a coordinate plane; the sides of the rectangle are parallel to coordinate axes.
An arc has the given center and radius, and lies in a plane
parallel to the -plane. Angles are measured from the
E1 direction in the current angle units.
An ellipse draws an elliptical arc with the specified center and ``axes''; precisely, the curve drawn is parametrized by