GINO Graphics Suite - GINO v9.0  

gDrawSpline

Syntax

[C/C++:]
void gDrawSplineBy2D(int npts, GPOINT *points2, int beg, int fin);
void gDrawSplineBy3D(int npts, GPOINT3 *points3, int beg, int fin);
void gDrawSplineTo2D(int npts, GPOINT *points2, int beg, int fin);
void gDrawSplineTo3D(int npts, GPOINT3 *points3, int beg, int fin);
[F90:]
subroutine gDrawSplineBy2D(npts, points2, beg, fin)
subroutine gDrawSplineBy3D(npts, points3, beg, fin)
subroutine gDrawSplineTo2D(npts, points2, beg, fin)
subroutine gDrawSplineTo3D(npts, points3, beg, fin)

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

Arguments

npts
Number of coordinate points specified

points2, points3
Array specifying series of relative or absolute points in space coordinates through which the curve is drawn

beg
End conditions for start of a spline curve

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

fin
End conditions for end of a spline curve (as for beg)

Description

The routines gDrawSplineBy2D(), gDrawSplineBy3D(), gDrawSplineTo2D()and gDrawSplineTo3D() draw a smooth spline curve through the specified number of relative or absolute coordinate points. In the case of gDrawSplineBy2D() and gDrawSplineBy3D(), the curve starts at the current drawing position and is drawn through npts series of vector increments. In the case of gDrawSplineTo2D() and gDrawSplineTo3D() 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() and the spline tension is controlled by the routine gSetSplineTension(). At least 3 points are required to define a spline curve.

The start and end directions of the spline 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 slope derivatives. 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 slopes and/or extra points defining the curve end conditions are set up using gSetCurveAttribs2D() or gSetCurveAttribs3D(). Note that, the spline curve drawing routines update the current curve end conditions so that the start and end slopes match those of the curve that has been drawn. The current curve end conditions can be enquired by calling gEnqCurveAttribs2D() or gEnqCurveAttribs3D().

See Also

gDrawSplinexx2D Usage
gDrawSplinexx3D Usage
gEnqCurveAttribs2D
gEnqCurveAttribs3D
gSetArcIncrement
gSetCurveAttribs2D
gSetCurveAttribs3D
gSetSplineTension