CURVE

The CURVE statement defines a three-dimensional parametric curve that you can reference using PTCV, CVCV, GRAPHICS statements, and function expressions.

Format

Arguments

 
CLOSED
Specifies that the curve meets at the ends. If you specify CURVE_POINTS, Adams Solver (FORTRAN) attempts to compute a curve that meets at the ends and has continuous first and second derivatives across the closure. If you specify FUNCTION, you must ensure that the defined curve meets at the ends and has continuous first and second derivatives across the closure. If the curve is closed, the first and last control or curve points must be the same. During a simulation, Adams Solver (FORTRAN) moves a PTCV or CVCV contact point across the closure, if necessary.
CURVE_POINTS
Specifies that the MATRIX contains data points on the curve.
FUNCTION=USER (r1[,...,r30])/
Defines and passes constants to CURSUB, the user-written subroutine that computes the curve coordinates and derivatives (see the CURSUB subroutine). The FUNCTION argument must be either the last argument in the CURVE statement or it must be followed by a backslash (\).
MATRIX=id
Specifies a MATRIX statement that contains data for a curve. The matrix contains the x, y, and z coordinates of the curve points. The matrix should have a row for each point and three columns containing the x-, y-, and z-coordinates of the points. You must supply at least four curve points. The first and last points must be the same for a closed curve.
MAXPAR=r
Specifies the maximum value of the curve parameter for a user-written curve. Adams Solver (FORTRAN) uses this value when drawing a curve graphic. The maximum parameter value is always 1.0 for curves you define using CURVE_POINTS.

Default: 1.0
MINPAR=r
Specifies the minimum value of the curve parameter for a user-written curve. Adams Solver (FORTRAN) uses this value when drawing a curve graphic. The minimum parameter value is always -1.0 for curves you define using CURVE_POINTS.

Default: -1.0
OPEN
Specifies that the curve does not meet at the ends. Adams Solver (FORTRAN) does not allow a PTCV or CVCV contact point to move beyond the end of the curve.
ORDER
Specifies the order of the B-spline interpolating the curve. A
B-spline of order K means that it is made up of piecewise polynomial segments of degree K-1. A cubic B-spline is order 4. A B-spline of order 2 is called a polyline because it is made up of straight line segments between each of the CURVE_POINTS. It is important to note that a B-spline of order K will have K-2 continuous derivatives. The discontinuities appear where the polynomial segments join together. Increasing the order of the B-spline arbitrarily may introduce unwanted oscillation into the curve.
Default: 4
Range: ORDER > 2
ROUTINE=libname::subname
Specifies an alternative library and name for the user subroutine CURSUB.
Learn more about the ROUTINE Argument.

Extended Definition

The x, y, and z coordinates of a point on a parametric curve are functions of an independent parameter, u. As u varies from its minimum to maximum value, the functions x(u), y(u), and z(u) sweep out points on the curve. A simple example of a parametric curve is a helix defined by the following equations and illustrated in the figure below:
x = cos(u)
y = sin(u)
z = u
Example of a Parametric Curve
Adams Solver (FORTRAN) lets you create curves in two ways:
Enter curve points to which Adams Solver (FORTRAN) matches a curve.
Write a CURSUB evaluation subroutine with which Adams Solver (FORTRAN) computes curve coordinates and derivatives.
A uniform B-spline is a piecewise polynomial spline used in many CAD (computer-aided design) applications. A B-spline is defined by control points that form a polygon in space and a knot vector. Adams Solver (FORTRAN) uses a non-uniform knot vector with quadruple multiplicity at both ends. The curve starts at the first control point and ends at the last. In between, it is attracted to, but does not necessarily hit, the intermediate control points. Adams Solver (FORTRAN) parameterizes a B-Spline starting at -1 and ending at +1. The figure below shows a set of control points and the B-spline curve it defines.
Control Points and the Resulting B-Spline
Adams Solver (FORTRAN) computes the control points internally from the curve points.
To use a different type of curve, or to model an analytically-defined curve such as a helix, you can write a CURSUB user-written subroutine. When providing a CURSUB, you can also specify MINPAR and MAXPAR to define the limits of the curve. These default to -1 and +1, respectively.
A curve is OPEN or CLOSED. A CLOSED curve meets at the ends, connecting the curve at minimum and maximum parameter values. Adams Solver (FORTRAN) automatically moves a PTCV or CVCV contact point across the closure of a CLOSED curve, if needed. For instance, you can model a cam profile as a CLOSED curve, and Adams Solver (FORTRAN) allows the follower to move across the closure as the cam rotates.
 
Caution:  
Adams Solver (FORTRAN) applies a force to prevent a PTCV or CVCV contact point from moving off the end of an open curve. For an open curve that is referenced by a PTCV or CVCV constraint, be sure to define an expected range of contact.

Examples

CURVE/5, OPEN, CURVE_POINTS, MATRIX=2
This statement creates an open curve using the curve point coordinates in MATRIX/2. Adams Solver (FORTRAN) computes a B-spline curve to fit the points.
CURVE/7, CLOSED, CURVE_POINTS, MATRIX=1, ORDER=2
This statement creates a closed curve of order 2 (polyline) using the curve point coordinates in MATRIX/1. Adams Solver (FORTRAN) computes a B-spline curve to fit the points.

Applications

The PTCV, CVCV, and GRAPHICS statements reference the CURVE statement:
The PTCV uses a curve to define a point-curve constraint.
The CVCV statement uses two curves to define a curve-curve constraint.
The GRAPHICS statement generates a graphic depicting the curve.
In each case, you must specify a reference marker that identifies the part to which the curve attaches and the coordinate system to which Adams Solver (FORTRAN) applies the curve coordinates. You can also reference a curve in a function expression, much like the cubic or Akima splines (see the CURVE function).
See other Reference data available.