GINO Graphics Suite - GINO v9.0  

gDrawAkima

Syntax

[C/C++:]
void gDrawAkimaBy2D(int npts, GPOINT *points, int beg, int fin);
void gDrawAkimaTo2D(int npts, GPOINT *points, int beg, int fin);
[F90:]
subroutine gDrawAkimaBy2D(npts, points, beg, fin)
subroutine gDrawAkimaTo2D(npts, points, beg, fin)

integer, intent(in) :: npts,beg,fin
type (GPOINT), intent(in) :: points(*)

Arguments

npts
Number of points

points
Array specifying series of relative or absolute points through which the curve is drawn

beg
End conditions for start of curve

= GXPOINT, Direction of curve calculated using extra point
= GNONE, No end conditions
= GANGLE, Direction of curve defined by angle

fin
End conditions for end of curve (as for start of curve)

Description

The routines gDrawAkimaBy2D() and gDrawAkimaTo2D() draw a piecewise smooth cubic curve through the specified number of relative or absolute coordinate points. The matching end slopes of the curve are computed using an averaging method due to Akima. In the case of gDrawAkimaBy2D(), the curve starts at the current drawing position and is drawn through npts series of vector increments. In the case of gDrawAkimaTo2D() the curve starts at the first element in points and is drawn through the intervening npts points. The number of sub-increments is controlled by the arc routine gSetArcIncrement().

The start and end directions of the curve can be separately controlled by setting beg and fin to non-zero values. If beg or fin is set to GANGLE, the direction of the curve is specified directly in terms of cosine and sine values. If beg or fin is set to GXPOINT, the direction of the curve is calculated so that the curve would pass through an extra specified point as if it was extended to include that point. These angles and/or extra points defining the curve end conditions are set up using gSetCurveAttribs2D(). Note that, the curve drawing routines update the current curve end conditions so that the start and end angles match those of the curve that has been drawn. The current curve end conditions can be enquired by calling gEnqCurveAttribs2D().

See Also

gDrawAkimaBy2D Usage
gEnqCurveAttribs2D
gSetArcIncrement
gSetCurveAttribs2D