BSD 3 development
[unix-history] / usr / man / man1 / spline.1g
CommitLineData
e6817382
BJ
1.TH SPLINE 1G
2.SH NAME
3spline \- interpolate smooth curve
4.SH SYNOPSIS
5.B spline
6[ option ] ...
7.SH DESCRIPTION
8.I Spline
9takes pairs of numbers from the standard input as abcissas and ordinates
10of a function.
11It produces a similar set, which
12is approximately equally spaced and
13includes the input set, on the standard output.
14The cubic spline output
15(R. W. Hamming,
16.ft I
17Numerical Methods for Scientists and Engineers,
18.ft R
192nd ed., 349ff)
20has two continuous derivatives,
21and sufficiently many points to look smooth when plotted, for
22example by
23.IR graph (1).
24.PP
25The following options are recognized,
26each as a separate argument.
27.TP 5
28.B \-a
29Supply abscissas automatically (they are missing from
30the input); spacing is given by the next
31argument, or is assumed to be 1 if next argument is not a number.
32.TP 5
33.B \-k
34The constant
35.IR k ""
36used in the boundary value computation
37.IP
38.if n .ig
39.ti +1.5i
40.ds ' \h'-\w'\(fm\(fm'u'
41.EQ
42.nr 99 \n(.s
43.nr 98 \n(.f
44'ps 10
45.ft I
46.ds 11 "y\(fm\(fm
47.nr 11 \w'\*(11'
48.ds 12 "\*'
49.nr 12 \w'\*(12'
50'ps 8
51.ds 13 "\fR0\fP
52.nr 13 \w'\*(13'
53.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
54'ps 10
55.nr 12 \n(12+\n(13+\w'\s8\|'
56.as 11 "\*(12
57.nr 11 \w'\*(11'
58.ds 12 "\|\|
59.nr 12 \w'\*(12'
60.as 11 "\*(12
61.nr 11 \w'\*(11'
62.ds 12 "\|=\|
63.nr 12 \w'\*(12'
64.as 11 "\*(12
65.nr 11 \w'\*(11'
66.ds 12 "\|\|
67.nr 12 \w'\*(12'
68.as 11 "\*(12
69.nr 11 \w'\*(11'
70.ds 12 "ky\(fm\(fm
71.nr 12 \w'\*(12'
72.as 11 "\*(12
73.nr 11 \w'\*(11'
74.ds 12 "\*'
75.nr 12 \w'\*(12'
76'ps 8
77.ds 13 "\fR1\fP
78.nr 13 \w'\*(13'
79.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
80'ps 10
81.nr 12 \n(12+\n(13+\w'\s8\|'
82.as 11 "\*(12
83.nr 11 \w'\*(11'
84.ds 12 ",
85.nr 12 \w'\*(12'
86.as 11 "\*(12
87.nr 11 \w'\*(11'
88.ds 12 "\|\|
89.nr 12 \w'\*(12'
90.as 11 "\*(12
91.nr 11 \w'\*(11'
92.ds 12 "\|\|
93.nr 12 \w'\*(12'
94.as 11 "\*(12
95.nr 11 \w'\*(11'
96.ds 12 "\|\|
97.nr 12 \w'\*(12'
98.as 11 "\*(12
99.nr 11 \w'\*(11'
100.ds 12 "y\(fm\(fm
101.nr 12 \w'\*(12'
102.as 11 "\*(12
103.nr 11 \w'\*(11'
104.ds 12 "\*'
105.nr 12 \w'\*(12'
106'ps 8
107.ds 13 "n
108.nr 13 \w'\*(13'
109.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
110'ps 10
111.nr 12 \n(12+\n(13+\w'\s8\|'
112.as 11 "\*(12
113.nr 11 \w'\*(11'
114.ds 12 "\|\|
115.nr 12 \w'\*(12'
116.as 11 "\*(12
117.nr 11 \w'\*(11'
118.ds 12 "\|=\|
119.nr 12 \w'\*(12'
120.as 11 "\*(12
121.nr 11 \w'\*(11'
122.ds 12 "\|\|
123.nr 12 \w'\*(12'
124.as 11 "\*(12
125.nr 11 \w'\*(11'
126.ds 12 "ky\(fm\(fm
127.nr 12 \w'\*(12'
128.as 11 "\*(12
129.nr 11 \w'\*(11'
130.ds 12 "\*'
131.nr 12 \w'\*(12'
132'ps 8
133.ds 13 "n\|\(mi\|\fR1\fP
134.nr 13 \w'\*(13'
135.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
136'ps 10
137.nr 12 \n(12+\n(13+\w'\s8\|'
138.as 11 "\*(12
139.nr 11 \w'\*(11'
140.ds 11 \x'0'\fI\*(11\s\n(99\f\n(98
141.ne 78u
142\*(11
143'ps \n(99
144.ft \n(98
145.EN
146..
147.if t .ig
148.ce
149(2nd deriv. at end) = k*(2nd deriv. next to end)
150..
151.IP
152.br
153is set by the next argument.
154By default
155.IR k ""
156= 0.
157.TP 5
158.B \-n
159Space output points
160so that approximately
161.I n
162intervals occur between the lower and upper
163.I x
164limits.
165(Default
166.I n
167= 100.)
168.TP 5
169.B \-p
170Make output periodic, i.e. match
171derivatives at ends.
172First and last input values should normally agree.
173.TP 5
174.B \-x
175Next
1761 (or 2) arguments are lower (and upper)
177.I x
178limits.
179Normally these limits are calculated from the data.
180Automatic abcissas start at lower limit
181(default 0).
182.SH "SEE ALSO"
183graph(1)
184.SH DIAGNOSTICS
185When data is not strictly monotone in
186.I x,
187.I spline
188reproduces the input without interpolating extra points.
189.SH BUGS
190A limit of 1000 input points is enforced silently.