(texdraw)Circles and arcs


Next: Bezier curves Prev: TeX text Up: TeXdraw Commands
Enter node , (file) or (file)node

2.7 Circles, ellipses and arcs
==============================

TeXdraw supplies commands to generate circles, ellipses and arcs.  There
are two forms of the circle command.  The '\lcir' command draws a circle
of given radius.  The '\fcir' command draws a filled circle.  In the
latter case, the circle is filled by a specified gray level.  For the
filled circle, the line defining the circumference of the circle is not
drawn.  Note that the gray level area filled in by the '\fcir' command
is opaque, even if the fill is chosen to be white.  For either form of
the circle command, the drawing size is increased if necessary to
contain the circle.

   The '\lellip' command generates an ellipse specified by the radius of
the ellipse in the X direction and the radius of the ellipse in the Y
direction.  The ellipse is symmetrical about horizontal and vertical
lines drawn through the current point.  The '\fellip' command draws a
filled ellipse.  In the latter case, the ellipse is filled by a
specified gray level.  For the filled ellipse, the line defining the
boundary of the ellipse is not drawn.  For either form of the ellipse
command, the drawing size is increased if necessary to contain the
ellipse.

   The '\larc' command generates a counterclockwise arc specified by a
start angle in degrees and an end angle in degrees.  The center of the
arc is the current position.  Only the arc is drawn, not the line
joining the center to the beginning of the arc.  Note that the '\larc'
command does not affect the size of the drawing.

'\lcir r:RADIUS'
     Draw a circle with center at the current position.  The radius is
     specified by RADIUS.  This command draws a line along the
     circumference of the circle.  The drawing size is increased if
     necessary to contain the circle.
'\fcir f:LEVEL r:RADIUS'
     Draw a filled circle with center at the current position.  The
     radius is specified by RADIUS.  The circle is painted with the gray
     level specified by LEVEL.  A gray level of 1 corresponds to white,
     with decreasing values getting darker.  The level 0 is full black.
     This command does not draw a line along the circumference.  The
     drawing size is increased if necessary to contain the circle.
'\lellip rx:X-RADIUS ry:Y-RADIUS'
     Draw an ellipse with center at the current position.  The radius in
     the X direction is specified by X-RADIUS.  The radius in the Y
     direction is specified by Y-RADIUS.  The drawing size is increased
     if necessary to contain the ellipse.
'\fellip f:LEVEL rx:X-RADIUS ry:Y-RADIUS'
     Draw a filled ellipse with center at the current position.  The
     radius in the X direction is specified by X-RADIUS.  The radius in
     the Y direction is specified by Y-RADIUS.  The ellipse is painted
     with the gray level specified by LEVEL.  A gray level of 1
     corresponds to white, with decreasing values getting darker.  The
     level 0 is full black.  This command does not draw a line along the
     boundary of the ellipse.  The drawing size is increased if
     necessary to contain the ellipse.
'\larc r:RADIUS sd:START-ANGLE ed:END-ANGLE'
     Draw a counterclockwise arc.  The center of the arc is at the
     current position.  The radius is specified by RADIUS.  The start
     and end angles (in degrees) are specified by START-ANGLE and
     END-ANGLE.  This command does not affect the limits (size) of the
     drawing.

   As an example, the following commands draw a filled circle, and
superimpose an arc.
     \centertexdraw{
       \linewd 0.02
       \fcir f:0.7 r:1
       \larc r:1 sd:45 ed:135
       \lvec (+0.707 +0.707) \move (0 0) \lvec (-0.707 +0.707)
     }

   Note that for the arc command, the resulting figure can spill outside
of the TeXdraw box as determined by the maximum excursions of the
coordinates.  Extra moves can be used to compensate for the size of the
arc.


automatically generated by info2www version 1.2.2.9