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