1KURV1(3NCARG) NCAR GRAPHICS KURV1(3NCARG)
2
3
4
6 KURV1 - calculate values for KURV2 usage
7
9 CALL KURV1 (N, X, Y, SLP1, SLPN, ISLPSW, XP, YP, TEMP, S, SIGMA, IER)
10
11 This subroutine calculates certain values that are used by KURV2 in
12 order to compute an interpolatory spline under tension through a
13 sequence of points in the plane. The actual computation of the interpo‐
14 lated values must be done using KURV2.
15
17 N (integer, input) The number of input data values. (N > 1)
18
19 X (real, input) An array containing the X values of the
20 points.
21
22 Y (real, input) An array containing the Y values of the
23 points. Adjacent pairs of points must be distinct.
24
25 SLP1 (real, input) A value (in radians) containing the slope at
26 (X(1),Y(1)). The angles are measured counter-clockwise
27 from the X axis and the positive sense of the curve is
28 assumed to be that moving from point 1 to point N. A value
29 for SLP1 may be omitted as indicated by the switch ISLPSW.
30
31 SLPN (real, input) A value (in radians) containing the slope at
32 (X(N),Y(N)). The angles are measured counter-clockwise from
33 the X axis and the positive sense of the curve is assumed
34 to be that moving from point 1 to point N. A value for SLP2
35 may be omitted as indicated by the switch ISLPSW.
36
37 ISLPSW (integer, input) A switch to indicate whether the slopes at
38 the end points should be calculated internally.
39
40 = 0 if SLP1 and SLPN are user-specified.
41 = 1 if SLP1 is user-specified, but SLPN calculated inter‐
42 nally.
43 = 2 if SLPN is user-specified, but SLP1 calculated inter‐
44 nally.
45 = 3 if SLP1 and SLPN are internally calculated.
46
47 XP (real, output) An array of length N.
48
49 YP (real, output) An array of length N.
50
51 TEMP (real, input) Scratch space.
52
53 S (real, input) An array of length N. On output, S contains
54 the polygonal arclengths of the curve.
55
56 SIGMA (real, input) Tension factor. Values near zero result in a
57 cubic spline; large values (e.g. 50) result in nearly a
58 polygonal line. A typical value is 1.
59
60 IER (integer, output) An error return value. If IER is returned
61 as 0, then no errors were detected.
62
63 = 1 if N is less than 2.
64 = 2 if a pair of adjacent points coincide.
65
67 To use KURV1, load the NCAR Graphics library ngmath.
68
70 kurv2, fitgrid_params.
71
72 Complete documentation for Fitgrid is available at URL
73 http://ngwww.ucar.edu/ngdoc/ng/ngmath/fitgrid/fithome.html
74
76 Copyright (C) 2000
77 University Corporation for Atmospheric Research
78
79 The use of this Software is governed by a License Agreement.
80
81
82
83UNIX March 1998 KURV1(3NCARG)