Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH SPLINE 1G |
2 | .SH NAME | |
3 | spline \- interpolate smooth curve | |
4 | .SH SYNOPSIS | |
5 | .B spline | |
6 | [ option ] ... | |
7 | .SH DESCRIPTION | |
8 | .I Spline | |
9 | takes pairs of numbers from the standard input as abcissas and ordinates | |
10 | of a function. | |
11 | It produces a similar set, which | |
12 | is approximately equally spaced and | |
13 | includes the input set, on the standard output. | |
14 | The cubic spline output | |
15 | (R. W. Hamming, | |
16 | .ft I | |
17 | Numerical Methods for Scientists and Engineers, | |
18 | .ft R | |
19 | 2nd ed., 349ff) | |
20 | has two continuous derivatives, | |
21 | and sufficiently many points to look smooth when plotted, for | |
22 | example by | |
23 | .IR graph (1). | |
24 | .PP | |
25 | The following options are recognized, | |
26 | each as a separate argument. | |
27 | .TP 5 | |
28 | .B \-a | |
29 | Supply abscissas automatically (they are missing from | |
30 | the input); spacing is given by the next | |
31 | argument, or is assumed to be 1 if next argument is not a number. | |
32 | .TP 5 | |
33 | .B \-k | |
34 | The constant | |
35 | .IR k "" | |
36 | used 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 | |
153 | is set by the next argument. | |
154 | By default | |
155 | .IR k "" | |
156 | = 0. | |
157 | .TP 5 | |
158 | .B \-n | |
159 | Space output points | |
160 | so that approximately | |
161 | .I n | |
162 | intervals occur between the lower and upper | |
163 | .I x | |
164 | limits. | |
165 | (Default | |
166 | .I n | |
167 | = 100.) | |
168 | .TP 5 | |
169 | .B \-p | |
170 | Make output periodic, i.e. match | |
171 | derivatives at ends. | |
172 | First and last input values should normally agree. | |
173 | .TP 5 | |
174 | .B \-x | |
175 | Next | |
176 | 1 (or 2) arguments are lower (and upper) | |
177 | .I x | |
178 | limits. | |
179 | Normally these limits are calculated from the data. | |
180 | Automatic abcissas start at lower limit | |
181 | (default 0). | |
182 | .SH "SEE ALSO" | |
183 | graph(1) | |
184 | .SH DIAGNOSTICS | |
185 | When data is not strictly monotone in | |
186 | .I x, | |
187 | .I spline | |
188 | reproduces the input without interpolating extra points. | |
189 | .SH BUGS | |
190 | A limit of 1000 input points is enforced silently. |