Fig4TeX Reference Guide

(Version 1.8.4, May 5, 2007)
| Introduction | Reference Guide | Tutorial | Examples | Pdf Documentation |
Alphabetical Lists of Macros
Geometrical macros - Mute macros
('\fig' Macros)
Writing macros - Non-mute macros
('\figwrite' Macros)
Macros for graphical generation
('\ps' Macros)
('\default' Macros)
Summary
Geometrical macros - Mute macros
Control macros
Basic macros
Macros for elementary geometry
Transformation macros (one result)
Transformation macros (multiple result)
Geometrical construction macros
Macros related to the triangle
Macros related to arcs and curves
Writing macros - Non-mute macros
Control macros
Writing macros
Macros for graphical generation
Control macros
Basic drawing macros
Other drawing macros
Arc
Arrow
Curve
Flow chart
Triangle related macros
Grid

Geometrical macros - Mute macros

Control macros

Top of page \figinit{ScaleFactorUnit} or \figinit{ScaleFactorUnit, 2D}
Top of page \figinit{ScaleFactorUnit, X} with X in {3D, cavalier, orthogonal, realistic}
Examples:  1  2  3  4  5

 Initialization before the creation of a new figure. It is necessary to call this
 macro in case of successive figures. No check is performed on the arguments.
 First argument : Choice of the unit and the scale factor.
  The unit can be one those defined in the TeX Book, namely: pt (TeX point),
  pc (pica, 1pc = 12pt), in (inch, 1in = 72.27pt), bp (big point, 72bp = 1in),
  cm (centimeter, 2.54cm = 1in), mm (millimeter, 10mm = 1cm), dd (point didot,
  1157dd = 1238pt), cc (cicero, 1cc = 12dd), sp (scaled point, 65536sp = 1pt)
  By default, pt is assumed and the scale factor is 1. For example, \figinit{in}
  is equivalent to \figinit{2.54cm}.
 Second argument (optional) : Choice of the space dimension and, in 3D, the
  projection type.
  If this argument is equal to 2D or absent, then geometry in the plane is assumed,
  otherwise geometry in three dimensions is performed.
  Moreover, if this argument is equal to:
   . orthogonal, then the orthogonal projection is used,
   . realistic, then the realistic projection is used,
   . 3D or cavalier (or anything else), then the cavalier projection is used.
Top of page \figinsert{} or \figinsert{ScaleFactor}
Top of page \figinsert{FileName} or \figinsert{FileName, ScaleFactor}
Examples:  1
 Insertion of the file FileName in the page, scaled by ScaleFactor which by default
 equals to 1. This macro must be used to include a graphical file created by Fig4TeX.
 If the argument is empty, blank or numeric, the default file name is used, i.e. the
 included file is the last file created by the command \psbeginfig{}. Otherwise,
 the first argument is assumed to be the valid file name of an existing file.
 If given, the file name must not begin with a digit.
 See also \figinsertE.
Top of page \figinsertE{FileName} or \figinsertE{FileName, ScaleFactor}
 Insertion of the external file FileName in the page, scaled by ScaleFactor
 which by default equals to 1. In PDF mode, this macro allows to include
 so-called "external" files such as JBIG2, JPEG, PDF or PNG files.
 In DVI mode, this macro allows to include PostScript files only.
Top of page \figscan FileName(HX,HY)
 Draws a rectangular grid with horizontal and vertical steps HX and HY, with
 numerical values corresponding to the bounding box read in the file FileName.
Top of page \figset keyword (attribute1=value1, attribute2=value2,...)
Examples:  1  2  3  4  5
 Setting parameters acting on the appearance of the figure, which are to be given
 as pairs of the form attribute = value. For each keyword, the attributes are given
 below, along with the possibles values, their default value and their definition:
 - keyword = projection
  . depth (or lambda) = real in [0,1] (default = 0.5): depth reduction coefficient
    (for the cavalier projection).
  . distance = real in user coordinates (default = 5 x largest dimension of
    the 3D bounding box): observation distance (for the realistic projection).
  . latitude (or theta) = angle in degrees (default = 25): latitude of the
    observation direction.
  . longitude (or psi) = angle in degrees (default = 40): longitude of the
    observation direction.
  . targetpt = point number (default = center of the 3D bounding box): target
    point (for the realistic projection).
  Nota: These attributes must be set before step 2 (\psbeginfig) and 3 (\figvisu).
        The cavalier projection is only defined by depth and psi. In this case,
        values of psi lying in [0,180] correspond to a view from above and to
        a view from beneath for values lying in [-180,0].
        The orthogonal projection is only defined by theta and psi.
        The realistic projection is defined by theta, psi, distance and targetpt.
        For those two projections, the observation direction is defined by the
        longitude psi and the latitude theta, with (psi, theta) = (0, 0)
        corresponding to the Ox line.
Top of page \figshowsettings
Examples:  1
 Prints to the terminal the current settings.
Top of page \figvisu{Vbox}{Caption}{Commands}
Examples:  1  2  3  4  5
 Creation of a Vbox containing the figure and the legends defined by the Commands,
 with a Caption centered below. Commands and Caption can be void.
 Three boxes are preallocated and are available to the user: \figBoxA, \figBoxB
 and \figBoxC (a single one is generally sufficient for a whole document since
 it can be reused several times).
 The numbers of the current figure and of the next one are also available via
 the expandable macros \figforTeXFigno and \figforTeXnextFigno.
Basic macros

Top of page \figpt NewPt :Text(X,Y)
Top of page \figpt NewPt :Text(X,Y,Z)
Examples:  1  2  3  4  5

 Definition of the point NewPt whose coordinates are (X,Y) or (X,Y,Z), with a joined Text.
 If Z is missing, then Z=0 is assumed.
 The default Text is $A_i$ where i is the number of the point (see \figsetptname).
Top of page \figptbary NewPt :Text[Pt1,... ,PtN ; Coef1,... ,CoefN]
Examples:  1  2  3  4  5
 Barycenter or centroid (with a joined Text) of N points bearing integer coefficients
Top of page \figptbaryR NewPt :Text[Pt1,... ,PtN ; Coef1,... ,CoefN]
Examples:  1  2
 Barycenter or centroid (with a joined Text) of N points bearing real coefficients
Top of page \figptcopy NewPt :Text/Pt/
Examples:  1  2
 Definition of NewPt, with an associated Text, with the same coordinates as Pt.
Top of page \figgetangle \Value [Center,Pt1,Pt2]
Top of page \figgetangle \Value [Center,Pt1,Pt2,Pt3]
Examples:  1
 Computation of the value \Value (in degrees) of the oriented angle (CP1, CP2), where
 C=Center, P1=Pt1, P2=Pt2. \Value is a macro whose name is chosen by the user and can
 then be used as a symbolic numerical constant.
 In 3D, the plane is oriented so that the angle is measured counterclockwise around the
 vector CP1 x CP3, where P3=Pt3. Notice that C, P1, P2 and P3 must be coplanar, but P3
 must not lie on the line (C,P1).
Top of page \figgetdist\Value[Pt1,Pt2]
Examples:  1  2  3  4  5
 Computation of the euclidian distance \Value between the points Pt1 and Pt2.
 \Value is a macro whose name is chosen by the user and can then be used as a symbolic
 numerical constant.
Top of page \figvectC NewVect (X,Y)
Top of page \figvectC NewVect (X,Y,Z)
Examples:  1  2  3  4  5
 Definition of the vector NewVect with components (X,Y) or (X,Y,Z).
 If Z is missing, then Z=0 is assumed.
Top of page \figvectN NewVect [Pt1,Pt2]
Top of page \figvectN NewVect [Pt1,Pt2,Pt3]
Examples:  1  2  3  4  5
 Definition of the vector NewVect which is:
 . in 2D, the vector with origin point Pt1 and end point Pt2 rotated by pi/2
   (so normal to [Pt1,Pt2]),
 . in 3D, the vector product P1P2 / ||P1P2|| x P1P3 / ||P1P3||, ie a vector normal to
   the plane defined by the 3 points and so that (P1P2, P1P3, NewVect) is a positively
   oriented basis.
Top of page \figvectNV NewVect [Vector]
Top of page \figvectNV NewVect [Vector1, Vector2]
Examples:  1  2
 Definition of the vector NewVect which is:
 . in 2D, the vector Vector rotated by pi/2
 . in 3D, the vector product Vector1 / ||Vector1|| x Vector2 / ||Vector2|| so that
 (Vector1, Vector2, NewVect) is a positively oriented basis.
Top of page \figvectP NewVect [Pt1,Pt2]
Examples:  1  2  3  4  5
 Definition of the vector NewVect with origin point Pt1 and end point Pt2.
Top of page \figvectU NewVect [Vector]
Examples:  1  2  3  4  5
 Definition of the unitary vector NewVect which is Vector normalized according to
 the unit and the scale factor chosen by the user (see \figinit).
Macros for elementary geometry

Transformation macros (one result)

Top of page \figptmap NewPt :Text= Pt /InvPt/A11,A12 ; A21,A22/
Top of page \figptmap NewPt :Text= Pt /InvPt/A11,A12,A13 ; A21,A22,A23 ; A31,A32,A33/

 Image NewPt (with a joined Text) of point Pt by the mapping defined by:
  . an invariant point InvPt
  . the matrix A whose coefficients are Aij, i,j in [1,d], d=2 in 2D or d=3 in 3D.
 If I=InvPt, P=Pt, P'=NewPt, P' is computed as IP' = A (IP).
Top of page \figpthom NewPt :Text= Pt /Center, Ratio/
Examples:  1  2  3
 Image NewPt of point Pt by the homothety of center Center and of ratio Ratio
 with a joined Text
Top of page \figptrot NewPt :Text= Pt /Center, Angle/
Top of page \figptrot NewPt :Text= Pt /Center, Angle, Vector/
Examples:  1  2  3  4  5
 Image NewPt (with a joined Text) of point Pt by the rotation defined:
 . in 2D, by the center Center and the angle Angle (in degrees),
 . in 3D, by the axis (Center, Vector) and the angle Angle (in degrees).
   Pt is rotated by Angle around the axis. The sense of rotation is such that
   (CP, CP', Vector) is a positively oriented basis, where C=Center, P=Pt, P'=NewPt.
Top of page \figptsym NewPt :Text= Pt /LinePt1, LinePt2/
Top of page \figptsym NewPt :Text= Pt /PlanePt, NormalVector/
 Image NewPt (with a joined Text) of point Pt by the orthogonal symmetry
 with respect to:
 . in 2D, the line defined by the points LinePt1 and LinePt2,
 . in 3D, the plane defined by the point PlanePt and the vector NormalVector normal
 to the plane.
Top of page \figpttra NewPt :Text= Pt /Lambda, Vector/
Examples:  1  2  3  4  5
 Image NewPt of point Pt by the translation of vector Lambda * Vector
 with a joined Text.
Top of page \figpttraC NewPt :Text= Pt /X,Y/
Top of page \figpttraC NewPt :Text= Pt /X,Y,Z/
Examples:  1  2  3  4  5
 Image NewPt of point Pt by the translation of vector (X,Y) in 2D, (X,Y,Z) in 3D
 with a joined Text.
Top of page \figptorthoprojline NewPt :Text= Pt /LinePt1, LinePt2/
Examples:  1  2  3  4  5
 Image NewPt of point Pt by the orthogonal projection onto the line (LinePt1,LinePt2),
 with a joined Text.
Top of page \figptorthoprojplane NewPt :Text= Pt /PlanePt, NormalVector/
Examples:  1  2
 Image NewPt of point Pt by the orthogonal projection onto the plane defined by
 the point PlanePt and the normal vector NormalVector, with a joined Text.
Transformation macros (multiple result)

Top of page \figptsmap NewPt1 = Pt1, Pt2, ..., PtN /InvPt/A11,A12 ; A21,A22/
Top of page \figptsmap NewPt1 = Pt1, Pt2, ..., PtN /InvPt/A11,A12,A13; A21,A22,A23; A31,A32,A33/

 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the mapping defined by:
  . an invariant point InvPt
  . the matrix A whose coefficients are Aij, i,j in [1,d], d=2 in 2D or d=3 in 3D.
 If I=InvPt, P=Pti, P'=NewPti, P' is computed as IP' = A (IP).
 See following information at \figptstra.
Top of page \figptshom NewPt1 = Pt1, Pt2, ..., PtN /Center, Ratio/
Examples:  1  2
 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the homothety of center Center and of ratio Ratio.
 See following information at \figptstra.
Top of page \figptsrot NewPt1 = Pt1, Pt2, ..., PtN /Center, Angle/
Top of page \figptsrot NewPt1 = Pt1, Pt2, ..., PtN /Center, Angle, Vector/
Examples:  1  2  3  4  5
 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the rotation defined:
 . in 2D, by the center Center and the angle Angle (in degrees),
 . in 3D, by the axis (Center, Vector) and the angle Angle (in degrees). Each point
   Pti is rotated by Angle around the axis. The sense of rotation is such that
   (CP, CP', Vector) is a positively oriented basis, where C=Center, P=Pti, P'=NewPti.
 See following information at \figptstra.
Top of page \figptssym NewPt1 = Pt1, Pt2, ..., PtN /LinePt1, LinePt2/
Top of page \figptssym NewPt1 = Pt1, Pt2, ..., PtN /PlanePt, NormalVector/
Examples:  1  2  3  4  5
 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the orthogonal symmetry with respect to:
 . in 2D, the line defined by the points LinePt1 and LinePt2,
 . in 3D, the plane defined by the point PlanePt and the vector NormalVector normal
 to the plane. See following information at \figptstra.
Top of page \figptstra NewPt1 = Pt1, Pt2, ..., PtN /Lambda, Vector/
Examples:  1  2  3  4  5
 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the translation of vector Lambda * Vector
 Text eventually previously associated with the result points is lost.
 The result points NewPti have successive numbers.
 The data points Pti can be given in any order.
 WARNING : Let Ir (resp. Id) the set of the result points numbers (resp. the set
 of the given points numbers). Let J the intersection of Ir and Id.
 1) Ir = Id, or J is empty, or NewPt1 does not belong to J: no problem.
 2) Otherwise, the result given by the macro MAY BE WRONG, at least partially:
    this is because, in this case, NewPt1 belongs to J, and the given points are
    taken into account sequentially, beginning from the first element in the list.
Top of page \figptsorthoprojline NewPt1 = Pt1, Pt2, ..., PtN /LinePt1, LinePt2/
Examples:  1
 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the orthogonal projection onto the line (LinePt1, LinePt2).
Top of page \figptsorthoprojplane NewPt1 = Pt1, Pt2, ..., PtN /PlanePt, NormalVector/
 Images NewPt1, NewPt1+1,..., NewPt1+(N-1) of points Pt1, Pt2, ..., PtN
 by the orthogonal projection onto the plane defined by the point PlanePt and the
 normal vector NormalVector.
Geometrical construction macros

Top of page \figptinterlines NewPt :Text[LinePt1,Vector1; LinePt2,Vector2]
Examples:  1  2  3  4  5

 Intersection of the line defined by the point LinePt1 and the vector Vector1
             and the line defined by the point LinePt2 and the vector Vector2
 with a joined Text
Top of page \figptinterlineplane NewPt :Text[LinePt,Vector; PlanePt,NormalVector]
Examples:  1  2  3  4
 Intersection of the line defined by the point LinePt and the vector Vector
             and the plane defined by the point PlanePt and the normal vector NormalVector
 with a joined Text.
Top of page \figptsaxes NewPt1 : Origin(X1,X2, Y1,Y2)
Top of page \figptsaxes NewPt1 : Origin(X1,X2, Y1,Y2, Z1,Z2)
Top of page \figptsaxes NewPt1 : Origin(L)
Examples:  1  2  3  4  5
 End points NewPt1, NewPt1+1 (and NewPt1+2 in 3D) of the arrows corresponding to
 the axes, drawn by the macro \psaxes. The text $x$, $y$ (and $z$ in 3D) is
 automatically joined to the points, so that writing the legend with the
 \figwriteX macros is more straightforward. For example, in 2D, one can write
 something like:  \figwrites NewPt1:(3pt) \figwritew NewPt1+1:(3pt)
 Remember that these macros can override the default text setting.
 The short form \figptsaxes NewPt1 : Origin(L) is equivalent to
 \figptsaxes NewPt1 : Origin(0,L, 0,L) in 2D and
 \figptsaxes NewPt1 : Origin(0,L, 0,L, 0,L) in 3D.
 NOTA: For simplicity of use, the arguments of this macro are deduced from
       those of \psaxes.
Top of page \figptendnormal NewPt :Text: Length,Lambda [Pt1,Pt2]
Examples:  1
 End point (with a joined Text) of the "exterior normal" to the segment [Pt1, Pt2].
 The length of the normal vector is Length. Lambda is the barycentric coordinate
 of the origin of the normal with respect to the segment [Pt1, Pt2], which sets the
 position of the vector along [Pt1, Pt2]. In 3D-mode, it works only in the plane Z=0.
Top of page \figptsintercirc NewPt1 [Center1,Radius1 ; Center2,Radius2]
Top of page \figptsintercirc NewPt1 [Center1,Radius1 ; Center2,Radius2 ; PlanePt]
Examples:  1  2  3
 Intersections NewPt1 and NewPt2 (=NewPt1+1) of the two circles defined by their
 center and radius, (Center1,Radius1) and (Center2,Radius2).
 NewPt1 and NewPt2 must be different from Center1 and Center2.
 NewPt1 and NewPt2 are ordered so that the angle (NewPt1, Center1, NewPt2) is positive.
 If the two circles do not intersect, then NewPt1=Center1 and NewPt2=Center2.
 In 3D, the plane containing the two circles is defined by the three points Center1,
 Center2 and PlanePt (which must not lie on the same line). The three points
 (NewPt1, Center1, NewPt2) defined the same orientation as (Center2, Center1, PlanePt).
Top of page \figptsinterlinell NewPt1 [Center,XRad,YRad,Inclination ; LinePt1,LinePt2]
 Intersections NewPt1 and NewPt2 (=NewPt1+1) of the line (LinePt1, LinePt2) and
 the ellipse defined by Center, XRad, YRad and Inclination (see \figptell).
 NewPt1 and NewPt2 must be different from LinePt1.
 NewPt1 and NewPt2 are ordered so that the vectors NewPt1NewPt2 and LinePt1LinePt2
 have the same direction.
 If the line does not intersect the ellipse, then NewPt1=LinePt1 and NewPt2=LinePt2.
 In 3D-mode, it works only in the plane Z=0.
Top of page \figptsinterlinellP NewPt1 [Center,PtAxis1,PtAxis2 ; LinePt1,LinePt2]
 Intersections NewPt1 and NewPt2 (=NewPt1+1) of the line (LinePt1, LinePt2) and
 the ellipse defined by its Center, and the end points of its axes, A1=PtAxis1 and
 A2=PtAxis2. The local axes are then defined by the basis (CA1, CA2).
 NewPt1 and NewPt2 must be different from LinePt1.
 NewPt1 and NewPt2 are ordered so that the vectors NewPt1NewPt2 and LinePt1LinePt2
 have the same direction.
 If the line does not intersect the ellipse, then NewPt1=LinePt1 and NewPt2=LinePt2.
 In 3D, the 5 data points must lie in the same plane ; this is not checked.
Top of page \figptvisilimSL NewPt:Text[SegPt1,SegPt2 ; LinePt1,LinePt2]
Examples:  1
 Apparent intersection NewPt (with a joined Text) of the segment [SegPt1,SegPt2]
 and the line (LinePt1,LinePt2). NewPt is the visible limit of the segment hidden
 by an object an edge of which is lying on the line.
 If the projection of the line intersects the segment, the solution NewPt lies
 between SegPt1 and SegPt2, otherwise NewPt = SegPt1.
Macros related to the triangle

Top of page \figptcircumcenter NewPt :Text[Pt1,Pt2,Pt3]
Examples:  1  2  3

 Center NewPt of the circumscribed circle to the triangle (Pt1,Pt2,Pt3) with a joined Text.
Top of page \figptexcenter NewPt :Text[Pt1,Pt2,Pt3]
 Center NewPt (with a joined Text) of the escribed circle to the triangle (Pt1,Pt2,Pt3)
 opposite to Pt1.
Top of page \figptincenter NewPt :Text[Pt1,Pt2,Pt3]
Examples:  1
 Center NewPt (with a joined Text) of the inscribed circle to the triangle (Pt1,Pt2,Pt3).
Top of page \figptorthocenter NewPt :Text[Pt1,Pt2,Pt3]
Examples:  1  2
 Orthocenter NewPt of the triangle (Pt1,Pt2,Pt3) with a joined Text.
Macros related to arcs and curves

Top of page \figptcirc NewPt :Text: Center;Radius (Angle)
Top of page \figptcirc NewPt :Text: Center,Pt1,Pt2;Radius (Angle)
Examples:  1  2  3

 Creation of the point NewPt, with an associated Text, on the circle defined by its Center,
 and its Radius. The position of the point is set by the Angle given in degrees.
 In 3D, the circle is lying in the plane (Center,Pt1,Pt2) = (C,P1,P2) and
 the Angle is measured counterclockwise around the vector CP1 x CP2, starting from
 the half-line (C,P1).
Top of page \figptell NewPt :Text: Center;XRad,YRad (Angle,Inclination)
Examples:  1  2  3
 Creation of the point NewPt, with an associated Text, on the ellipse defined by Center,
 XRad, YRad and Inclination. Inclination is the rotation angle of the local axes with
 respect to the paper sheet. The position of the point is set by the parametrization
 Angle given in local axes. The two angles are given in degrees.
 In 3D-mode, it works only in the plane Z=0.
Top of page \figptellP NewPt :Text: Center,PtAxis1,PtAxis2 (Angle)
 Creation of the point NewPt, with an associated Text, on the ellipse defined by its Center,
 and the end points of its axes, A1=PtAxis1 and A2=PtAxis2. The local axes are then
 defined by the basis (CA1, CA2). The position of the point is set by the parametrization
 Angle given in degrees, starting from the half-line (C,A1) and measured counterclockwise
 around the vector CA1 x CA2.
Top of page \figptBezier NewPt :Text: t [Pt1,Pt2,Pt3,Pt4]
Examples:  1  2  3  4  5
 Computes the point NewPt (with a joined Text) lying on the cubic Bezier curve defined
 by the four control points Pt1, Pt2, Pt3 and Pt4, for the parameter value t.
 We recall that if t=0, NewPt=Pt1 and if t=1, NewPt=Pt4.
Top of page \figptscontrol NewPt1 [Pt1,Pt2,Pt3,Pt4]
Examples:  1  2  3  4
 Computes the two control points NewPt1 and NewPt2 (=NewPt1+1) so that the cubic Bezier
 curve defined by the control points Pt1, NewPt1, NewPt2 and Pt4 interpolates the
 four points Pt1, Pt2, Pt3 and Pt4 with respective parameter values of 0, 1/3, 2/3 and 1.
 The result points numbers can be anyone including Pt1, Pt2, Pt3 and Pt4.
Top of page \figptscontrolcurve NewPt1, \NbArcs [Pt0,Pt1,... ,PtN,PtN+1]
Examples:  1
 Computes the control points NewPt1, NewPt1+1,..., NewPt1+M used by the macro
 \pscurve when it is invoqued by  \pscurve [Pt0,Pt1,... ,PtN,PtN+1]
 which draws a curve that consists in N-1 cubic Bezier arcs.
 \NbArcs is a TeX macro whose name is chosen by the user. It can be considered
 as a variable and on output, its value is N-1 so that the calling sequence
  \psBezier \NbArcs [NewPt1, NewPt1+1,..., NewPt1+M] draws exactly the same curve.
 As a consequence, the data points Pti are duplicated on output : indeed, we have
 NewPt1+J = Pti with J=3*(i-1), i=1,...N.
 The result points numbers must be different from any of Pt0,Pt1,... ,PtN,PtN+1.
 On output, a total of M+1 points are created, with M = 3 * \NbArcs.
 NOTA : this macro uses the current value of curve roudness.
Top of page \figptcurvcenter NewPt :Text: t [Pt1,Pt2,Pt3,Pt4]
Examples:  1  2
 Curvature center NewPt (with a joined Text) at the point lying on the cubic Bezier curve
 defined by the four control points Pt1, Pt2, Pt3 and Pt4, for the parameter value t.
Top of page \figvectDBezier NewVect : n, t [Pt1,Pt2,Pt3,Pt4]
Examples:  1  2  3
 Computes the vector NewVect corresponding to the derivative of order n of the cubic Bezier
 curve defined by the four control points Pt1, Pt2, Pt3 and Pt4, for the parameter value t.
 The order n must be equal to 1 or 2.
Writing macros - Non-mute macros

Control macros

Top of page \figcoord{NDec}
Examples:  1

 To write the coordinates of a point. To be used in the joined text argument
 of the macros that create points and the non-mute macros \figwrit* .
 Only NDec decimals are printed. See also \figsetroundcoord.
Top of page \figsetmark{Mark}
Examples:  1  2  3  4  5
 Definition of the point marker to be written, for example a point (.) or $\bullet$.
 By default, nothing is written.
Top of page \figsetptname{Name}
Examples:  1  2  3  4  5
 Sets the new default name for the points created.
 The default name for the point i is $A_i$: \figsetptname{$X^{(#1)}$} changes it
 to $X^{(i)}$.
Top of page \figsetroundcoord{yes/no}
 Switches on rounding of decimals printed with \figcoord.
Top of page \figshowpts[Nmin, Nmax]
Examples:  1  2  3  4  5
 Shows on the figure the location of every point defined since the beginning
 of the session, whose number lies in the interval [Nmin, Nmax].
 Writes a bullet at each location point along with the number of the point or
 the joined text if any.
 CAUTION :
 If Nmax-Nmin is too large, an error message "! TeX capacity exceeded" may occur.
Writing macros

Top of page \figwrite[Pt1, Pt2, ..., PtN]{Text}
Examples:  1  2  3  4  5

 Writing a Text after Pt1, Pt2, ..., PtN according to TeX's alignment.
Top of page \figwritec[Pt1, Pt2, ..., PtN]{Text}
Examples:  1  2  3  4  5
 Writing a Text vertically and horizontally centered at Pt1, Pt2, ..., PtN.
Top of page \figwritep[Pt1, Pt2, ..., PtN]
Examples:  1  2  3  4  5
 Writing the point marker at the locations defined by Pt1, Pt2, ..., PtN.
Top of page \figwritew Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritee Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwriten Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwrites Pt1, Pt2, ..., PtN :Text(Distance)
Examples:  1  2  3  4  5
 Writing the point marker at the locations defined by Pt1, Pt2, ..., PtN, with a Text
 placed, with respect to each point, at a given Distance from each point towards
 the west, the east, the north or the south. Distance measures the shortest path
 between each Pti and the bounding box of the Text.
Top of page \figwritenw Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritesw Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritene Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritese Pt1, Pt2, ..., PtN :Text(Distance)
Examples:  1  2  3  4  5
 Writing the point marker at the locations defined by Pt1, Pt2, ..., PtN, with a Text
 placed, with respect to each point, at a given Distance from each point towards
 the north-west, the south-west, the north-east or the south-east. Distance measures
 the shortest path between each Pti and the bounding box of the Text.
Top of page \figwritebw Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritebe Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritebn Pt1, Pt2, ..., PtN :Text(Distance)
Top of page \figwritebs Pt1, Pt2, ..., PtN :Text(Distance)
 Writing a point marker at the locations defined by Pt1, Pt2, ..., PtN, with a Text
 placed, with respect to each point, at a given Distance from each point towards
 the west, the east, the north or the south (BASELINE version).
 If X=w or e, Distance measures the length between Pti and the end (resp. the beginning)
 of the Text, while the baseline of the Text is set to Pti's ordinate.
 If X=n or s, the Text is horizontally centered and Distance measures the length between
 Pti and the baseline of the Text.
Top of page \figwritegcw Pt1, Pt2, ..., PtN :Text(DistanceX,DistanceY)
Top of page \figwritegce Pt1, Pt2, ..., PtN :Text(DistanceX,DistanceY)
 Writing the point marker at the locations defined by Pt1, Pt2, ..., PtN, with a Text
 placed, with respect to each point, at a horizontal distance DistanceX (west or east)
 and a vertical distance DistanceY between the point and the mid-height of the text.
Top of page \figwritegw Pt1, Pt2, ..., PtN :Text(DistanceX,DistanceY)
Top of page \figwritege Pt1, Pt2, ..., PtN :Text(DistanceX,DistanceY)
Examples:  1
 Writing the point marker at the locations defined by Pt1, Pt2, ..., PtN, with a Text
 placed, with respect to each point, at a horizontal distance DistanceX (west or east)
 and a vertical distance DistanceY from the bottom of the bounding box of the Text if
 DistanceY > 0, from its top if DistanceY < 0. If DistanceY = 0, the Text is vertically
 centered.
Macros for graphical generation

Control macros

Top of page \psbeginfig{} or \psbeginfig{FileName}
Examples:  1  2  3  4  5

 Starting the creation of a graphical file whose name is FileName.
 If the argument FileName is empty or blank, an internal default file name is used,
 which is always updated, regardless the update mode.
 See \figinsert for details.
Top of page \psendfig
Examples:  1  2  3  4  5
 End of the current graphical file.
Top of page \psreset{keyword1, keyword2,...}
Examples:  1  2  3  4  5
 To reset one or several groups of graphical attributes to their default values.
 The groups of attributes are denoted with keywords which are:
  - arrowhead to reset the arrow-head attributes,
  - curve to reset the (\ps)curve attributes,
  - first to reset the first-level (or primary) attributes,
  - flowchart to reset the flow chart attributes,
  - mesh to reset the (\ps)mesh attributes,
  - second to reset the second-level (or secondary) attributes,
  - third to reset the third-level (or ternary) attributes.
Top of page \psset keyword (attribute1=value1, attribute2=value2,...)
Examples:  1  2  3  4  5
 Setting the graphical attributes, which are to be given as pairs of the form
 attribute = value. For each keyword, the attributes are given below, along with the
 possible values, their default name in parentheses and their definition.
 The current value can be obtained with the help of \figshowsettings.
 - NO keyword or keyword = first
  . color = color definition (\defaultcolor): primary color in cmyk or rgb color code,
    or in gray tone (real number between 0 (black) and 1 (white).
  . dash = index or dash pattern (\defaultdash): line style given by Index (Index = 1
    (solid) to 10) or by Pattern.
  . fillmode = yes/no (\defaultfill): setting the filling mode to "no" tells the
    drawing macros to draw lines ; setting the filling mode to "yes" tells the macros
    to fill the appropriate area using the current color or gray shade.
  . join = miter (V), round (U) or bevel (\_/) (\defaultjoin): line join parameter that
    establishes the shape to be put at the corners of a polygonal line. Best rendering
    is obtained with join=round when more than 2 segments meet at a corner.
  . update = yes/no (\defaultupdate): setting the update mode to "yes" (resp. to "no")
    before \psbeginfig enforces (resp. avoids) the graphical file to be recreated at
    each compilation.
  . width = dimension in PostScript units (\defaultwidth): line width.
    Note : has no effect on a straight line after \psset (fillmode=yes).
 - keyword = arrowhead
  . angle = real in degrees (\defaultarrowheadangle): arrow-head opening half-angle.
  . fillmode = yes/no (\defaultarrowheadfill): arrow-head filling switch, which tells
    whether the interior of the arrow-head must be filled or not.
  . length = real in user coordinates (\defaultarrowheadlength): length of each edge
    of the arrow-head.
  . out = yes/no (\defaultarrowheadout): arrow-head "outside" switch, which tells
    whether the arrow-head must be drawn outside the body of the arrow (as if it was
    rotated by 180 degrees around the end point) or not.
  . ratio = real in [0,1] (\defaultarrowheadratio): arrow-head ratio defining the
    arrow-head length to be ratio x (body length).
   Nota : The two attributes length and ratio are mutually exclusive ; the default is
          to use the length.
 - keyword = curve
  . roundness = real usually in [0,0.5] (\defaultroundness): roundness of a C1 curve.
 - keyword = flowchart
  . arrowposition = real in [0,1] (\defaultfcarrowposition): arrow-head position along
    the path, 0 corresponding to the beginning and 1 to the end of the path.
  . arrowrefpt = start/end (\defaultfcarrowrefpt): reference point of the arrow-head
    to its start point or to its end point ; the arrow-head position is computed with
    respect to this point.
  . line = polygon/curve (\defaultfcline): tells \psfcconnect to draw the path between
    two nodes using polygonal lines or smooth curved lines.
  . padding = real in user coordinates (see xpadding and ypadding): space surrounding
    the text inside a frame. Both horizontal and vertical padding are set to the
    same value. This attribute allows to reduce or enlarge the frames drawn at the
    nodes of the flow chart, starting from the internal default dimensions.
  . radius = positive real in user coordinates (\defaultfcradius): radius of the
    circular arcs to be drawn at the corners of the path when the line is polygonal.
  . shape = rectangle, ellipse or lozenge (\defaultfcshape): shape of the frames.
  . thickness = real in user coordinates (\defaultfcthickness): thickness of the frames.
  . xpadding = real in user coordinates (\defaultfcxpadding): horizontal space around the
    text inside a frame.
  . ypadding = real in user coordinates (\defaultfcypadding): vertical space around the
    text inside a frame.
  Notice that the frame color is set by the primary color, the thickness color is set by
  the secondary color and the background color of the frame is set by the ternary color.
 - keyword = mesh
  . diag = integer in {-1,0,1} (\defaultmeshdiag): controls the drawing of a grid mesh.
    If diag=0, each cell is empty ; if diag=1 (resp. diag=-1), the SW-NE diagonal (resp.
    the NW-SE diagonal) is drawn inside each cell.
 - keyword = second
  . color = color definition (\defaultsecondcolor): secondary color (see primary one).
  . dash = index or dash pattern (\defaultseconddash): secondary line style.
  . width = dimension in PostScript units (\defaultsecondwidth): secondary line width.
 - keyword = third
  . color = color definition (\defaultthirdcolor): ternary color (see primary one).
Top of page \pssetdefault keyword (attribute1=value1, attribute2=value2,...)
Examples:  1
 Global setting of the default values of graphical attributes, which are to be given
 as pairs of the form attribute=NewDefaultValue.
 The attributes are set up to the end of the document or up to next call to this macro.
 For each keyword, the attributes are listed below ; see \psset for their definition
 (particular case : \pssetdefault arrowhead(length=DimWithUnit)).
 - NO keyword or keyword = first: color, dash, fillmode, join, update, width,
 - keyword = arrowhead: angle, fillmode, length, out, ratio,
 - keyword = curve: roundness,
 - keyword = flowchart: arrowposition, arrowrefpt, line, padding, shape,
             thickness, xpadding, ypadding,
 - keyword = mesh: diag,
 - keyword = second: color, dash, width,
 - keyword = third: color.
Basic drawing macros

Top of page \pscirc Center (Radius)
Top of page \pscirc Center,Pt1,Pt2 (Radius)
Examples:  1  2  3  4  5

 Circle of center Center and of radius Radius.
 In 3D, the circle is in the plane defined the 3 points Center, Pt1 and Pt2 ;
 Pt1 and Pt2 do not need to lie on the circle.
Top of page \psline[Pt1,Pt2,... ,PtN]
Examples:  1  2  3  4  5
 Line defined by N points, closed if the last point number equals the first one.
Top of page \pslineC(X1 Y1, X2 Y2,..., XN YN)
Top of page \pslineC(X1 Y1 Z1, X2 Y2 Z2,..., XN YN ZN)
Examples:  1  2  3  4  5
 Line defined by N points, closed if the last point number equals the first one.
 The points are given by their coordinates, each of them separated by a white space.
Top of page \pslineF{Filename}
Examples:  1  2
 Line defined by points read from the text file Filename, which contains the
 coordinates of the points, one point per line, given as  X Y  in 2D and as
 X Y Z  in 3D (the values must be separated by a white space and nothing else).
 The line is closed if the last point equals the first one.
Other drawing macros

Arc

Top of page \psarccirc Center ; Radius (Ang1,Ang2)
Top of page \psarccirc Center,Pt1,Pt2 ; Radius (Ang1,Ang2)
Examples:  1  2  3  4  5

 Circular arc of center Center and radius Radius limited by the angles
 Ang1 and Ang2 given in degrees.
 In 2D, the angles are measured counterclockwise.
 In 3D, the arc lies in the plane defined by the 3 points Center, Pt1 and Pt2.
 The angles are measured counterclockwise around the vector CP1 x CP2, starting
 from the half-line (C, P1), where C=Center, P1=Pt1, P2=Pt2.
Top of page \psarccircP Center ; Radius [Pt1,Pt2]
Top of page \psarccircP Center ; Radius [Pt1,Pt2,Pt3]
Examples:  1  2  3  4  5
 Point version of \psarccirc
 Circular arc of center Center and of radius Radius limited by the two half-lines
 (Center, Pt1) and (Center, Pt2).
 Let N be the normal vector that orients the plane in which lies the arc.
 In 2D, N is defined as usual by N = Z = X x Y.
 In 3D, N = CP1 x CP3, where C=Center, P1=Pt1, P3=Pt3.
 The arc is drawn from Pt1 towards Pt2 turning counterclockwise around the axis (C; N).
 Notice that C, P1, P2 and P3 must be coplanar, but P3 must not lie on the line (C,P1).
Top of page \psarcell Center ; XRad,YRad (Ang1,Ang2, Inclination)
Examples:  1
 Arc of ellipse of center Center, of axes XRad and YRad, limited by the parametrization
 angles Ang1 and Ang2. The major axis is turned by an angle Inclination from the
 horizontal line. The angles are given in degrees and measured counterclockwise.
 In 3D-mode, it works only in the plane Z=0.
Top of page \psarcellPA Center,PtAxis1,PtAxis2 (Ang1, Ang2)
 Arc of ellipse of center Center limited by the parametrization angles Ang1 and Ang2.
 The end point of the major axis is PtAxis1 and the end point of the minor axis is PtAxis2.
 The angles are given in degrees and measured counterclockwise around the vector CA1 x CA2.
Top of page \psarcellPP Center,PtAxis1,PtAxis2 [Pt1,Pt2]
 Arc of ellipse of center Center limited by the two half-lines (Center,Pt1)
 and (Center,Pt2). The end point of the major axis is PtAxis1 and the end point
 of the minor axis is PtAxis2. The arc is drawn counterclockwise around the vector
 CA1 x CA2, where C=Center, A1=PtAxis1, A2=PtAxis2.
Arrow

Top of page \psarrow [Pt1,Pt2]
Examples:  1  2  3  4  5

 Arrow from Pt1 to Pt2.
 The arrow-head is drawn according to the \psarrowhead macro settings.
Top of page \psarrowBezier [Pt1,Pt2,Pt3,Pt4]
Examples:  1  2
 Arrow that consists of the cubic Bezier curve defined by the four control points
 Pt1, Pt2, Pt3 and Pt4, and the arrow-head at point Pt4.
Top of page \psarrowcirc Center ; Radius (Ang1,Ang2)
Top of page \psarrowcirc Center,Pt1,Pt2 ; Radius (Ang1,Ang2)
Examples:  1  2  3  4  5
 Circular arrow such that the circular arc is centered at Center, has the radius Radius
 and is limited by the angles Ang1 and Ang2 given in degrees.
 If Ang2 > Ang1, the arrow is drawn counterclockwise, else it is drawn clockwise.
 The arrow-head is drawn according to the \psarrowhead macro settings.
 In 3D, the arc lies in the plane defined the 3 points Center, Pt1 and Pt2.
 The angles are measured counterclockwise around the vector CP1 x CP2, starting
 from the half-line (C, P1), where C=Center, P1=Pt1, P2=Pt2.
Top of page \psarrowcircP Center ; Radius [Pt1,Pt2]
Top of page \psarrowcircP Center ; Radius [Pt1,Pt2,Pt3]
Examples:  1  2  3  4  5
 Point version of \psarrowcirc
 Circular arrow such that the circular arc is centered at Center, has the radius
 |Radius| and is limited by the two half-lines (Center, Pt1) and (Center, Pt2).
 Let N be the normal vector that orients the plane in which lies the arc.
 In 2D, N is defined as usual by N = Z = X x Y.
 In 3D, N = CP1 x CP3, where C=Center, P1=Pt1, P3=Pt3.
 The arrow is drawn from Pt1 towards Pt2 turning around the axis (Center; N):
  . counterclockwise if Radius > 0,
  . clockwise if Radius < 0.
 Notice that C, P1, P2 and P3 must be coplanar, but P3 must not lie on the line (C,P1).
Top of page \psarrowhead [Pt1,Pt2]
Examples:  1  2  3
 Arrow-head of the arrow from Pt1 to Pt2. The segment [Pt1, Pt2] (body) is not drawn.
 The appearance of the arrow-head can be modified with the help of attributes set by
 the macro \psset arrowhead(...).
Top of page \psaxes Origin(X1,X2, Y1,Y2)
Top of page \psaxes Origin(X1,X2, Y1,Y2, Z1,Z2)
Top of page \psaxes Origin(L)
Examples:  1  2  3  4  5
 Axes defined by their Origin and coordinate ranges. Each axis is parallel to the
 corresponding absolute axis and is drawn as an oriented arrow from start value
 to stop value.
 The short form \psaxes Origin(L) is equivalent to \psaxes Origin(0,L, 0,L)
 in 2D and \psaxes Origin(0,L, 0,L, 0,L) in 3D.
 The end points of the axes are given by \figptsaxes.
Curve

Top of page \psBezier N [Pt_1, ..., Pt_{3N+1}]
Examples:  1  2  3  4  5

 Bezier curve defined by N cubic arcs. The arc number i is defined by the four
 control points P_{j}, P_{j+1}, P_{j+2}, P_{j+3} with j=3i-2.
 The curve interpolates each 3 points beginning with the first, i.e. at P_{3i-2},
 i=1,...N+1. At these points, the curve is only C0. To obtain G1 continuity at P_j,
 the points P_{j-1}, P_j and P_{j+1} must be aligned.
 The total number of points must be 3N+1 and is not checked.
Top of page \pscurve [Pt0,Pt1,... ,PtN,PtN+1]
Examples:  1  2  3  4  5
 C1 curve that interpolates the points P1, P2,... ,Pn. The curve consists of
 n-1 Bezier cubic arcs. The direction of the tangent at Pi is given by Pi-1Pi+1,
 i=1,... ,n. To get a C1 closed curve, the last three points must be the same
 as the first three ones.
 The shape of the curve can be modified by a roundness coefficient to be
 set by the macro \psset curve(...). The best values for this coefficient are
 in the interval [0.15, 0.3] (0 gives a polygonal line).
Flow chart

Top of page \psfcconnect[Pt1,Pt2,... ,PtN]
Examples:  1  2  3  4

 Connections between nodes in a flow chart. Each connection path can be a polygonal
 line or a curved line. An arrow-head is drawn by default at the middle point of the
 path joining the points Pt1,Pt2,... ,PtN.
 The attributes of the path are set by the macro \psset flowchart(...).
 The frames at the nodes are drawn with the help of the macro \psfcnode.
Top of page \psfcnode[Pt1,Pt2,... ,PtN]{Text}
Examples:  1  2  3  4  5
 Frames containing Text at each node centered on points Pt1,Pt2,... ,PtN in a flow chart.
 If the Text argument is empty, the text joined to the points when they are defined
 is used ; otherwise, this Text is used for every point Pt1,Pt2,... ,PtN. The frame
 surrounding the text is reduced or enlarged according to the padding dimensions.
 This attribute along with the other ones is set by the macro \psset flowchart(...).
 The connections between the nodes are usually drawn by the macro \psfcconnect. If no
 arrows are wanted, the best is to say \psset arrowhead(length=0) ; the macros \psline or
 \pscurve can also be used.
Triangle related macros

Top of page \psaltitude Dim [Pt1,Pt2,Pt3]
Examples:  1  2  3  4  5

 Altitude from Pt1 in the triangle (Pt1, Pt2, Pt3). Dim is the dimension of the
 square at the foot H of the altitude. The square is drawn as a solid line on either
 side of the altitude according to the order of the 2 points Pt2 and Pt3.
 If H is outside the the segment [Pt2, Pt3], a line is drawn to support the square ;
 the graphical attributes of this line are secondary settings (see \psset second).
Top of page \psnormal Length,Lambda [Pt1,Pt2]
Examples:  1
 Exterior normal of length Length to the segment [Pt1, Pt2]. Lambda is the barycentric
 coordinate of the origin of the normal with respect to the segment [Pt1, Pt2], which
 sets the position of the vector along [Pt1, Pt2].
 In 3D-mode, it works only in the plane Z=0.
Grid

Top of page \psmesh N1,N2 [Pt1,Pt2,Pt3,Pt4]

 Mesh of N1 x N2 intervals on the quadrangle (Pt1, Pt2, Pt3, Pt4), N1 along
 [Pt1, Pt2] and [Pt3, Pt4], N2 along the 2 other segments. A flag set by
 \psset mesh(...) allows to draw a diagonal line inside each cell. The internal
 mesh is drawn according to the secondary graphical settings (see \psset second).
Top of page \pstrimesh Type [Pt1,Pt2,Pt3]
Examples:  1
 Mesh of the type Type triangle in the triangle (Pt1, Pt2, Pt3). The internal
 mesh is drawn according to the secondary graphical settings (see \psset second).