Arcs and Circles

When creating arcs and sectors note that angles are measured in degrees; where zero(0) is the positive X axis in a right-handed Cartesian coordinate system and positive angles sweep counterclockwise. If filling sectors or circles (As described in the section on polygons) hatch pitch is measured in world coordinates and is initially set to 0.1. The intial hatch angle is zero(0).


circleprecision(nsegs)

Set the number of line segments making up a circle. Default is currently 32. The number of segments in an arc or sector is calculated from the variable "nsegs" according to the span of the arc or sector.

   Fortran:
        subroutine circleprecision(nsegs)
        integer   nsegs
   C:
        circleprecision(nsegs)
             int  nsegs;

   Pascal:
        procedure CirclePrecision(nsegs: integer)
circleprecision

circles are drawn with various circle precision values.


arc(x, y, radius, startang, endang)

Draw an arc. x, y, and radius are values in world units.

   Fortran:
        subroutine arc(x, y, radius, startang, endang)
        REAL x, y, radius, startang, endang
   C:
        arc(x, y, radius, startang, endang)
             float  x, y, radius;
             float  startang, endang;

   Pascal:
        procedure Arc(x, y, radius, startang, endang: real)

Angles are in degrees, positive measured counterclockwise from the +X axis. The current position after the arc is drawn is at the end of the arc.

arc

The arcs are drawn; followed by a draw to the arc center (using "draw2(X,Y)").


sector(x, y, radius, startang, endang)

Draw a sector. x, y, and radius are values in world units. Note: sectors are regarded as polygons, so if polyfill or polyhatch has been called with 1, the sectors will be filled or hatched accordingly.

   Fortran:
        subroutine sector(x, y, radius, startang, endang)
        REAL x, y, radius, startang, endang
   C:
        sector(x, y, radius, startang, endang)
             float  x, y, radius;
             float  startang, endang;

   Pascal:
        procedure Sector(x, y, radius, startang, endang: real)
sector

circle(x, y, radius)

Draw a circle. x, y, and radius are values in world units. Note: circles are regarded as polygons, so if polyfill or polyhatch has been called with 1, the circle will be filled or hatched accordingly. x and y real coordinates in user units.

   Fortran:
        subroutine circle(x, y, radius)
        REAL x, y, radius
   C:
        circle(x, y, radius)
             float     x, y, radius;

   Pascal:
        procedure Circle(x, y, radius: real)
circle

circles are drawn with polygon fill and hatch fill options. Multiple calls were used to create the filled, crosshatched and outlined circle.