Previous: exit Up: ../slides.html Next: fontfontname--switchchar--
TENSIONED-SPLINE nfit tension) Default: FIT B-SPLINE 251 0 0 0 Request that subsequent POLYLINE and POLYGON (but not POLYMARKER or LINE) data which is plotted be fit to a cubic B-spline, Bezier curve, or tensioned spline before plotting. The subcommand NONE can be used to cancel any existing fit option. The fitting methods can be used for data forming closed curves or multi-valued curves, as well as for single-valued functions. Caution should be employed with polygon fits, since the time required to fill a polygon with a pattern is proportional to the number of vertices. Reasonable defaults are provided for the numeric parameters, so that in most cases, simply specifying "FIT method-name" will suffice. See the abstracts of routines FITBS3, FITBZ3, FITPC3, and FITPO3 for details of the fitting methods used. The value nfit specifies the number of points to compute; it is limited by the size of an internal buffer (currently 1000 points) and will be reduced if too large. If nfit is smaller than the number of data points, the fit will be suppressed. With the B-spline and Bezier curve fits, the curve will not in general pass through the data points, but will lie inside their convex hull. The convex hull of a set of points is simply the smallest enclosing polygon (or polyhedron in 3-D) which has no interior angles exceeding 180 degrees. The three parameters k1, kn, and kextra define the number of times the first (k1) and last (kn) points should be implicitly repeated, and the number of extra points (kextra) to be implicitly generated by wrapping around from the last to the first. Values of k1 = kn = 1 will ensure that the curve starts at the first point and ends at the last point. With a B-spline fit for polygons, the actual values of k1, kn, and kextra will be ignored, and values of 0, 0, and 3, respectively, will be assumed in order to obtain a closed curve. With the tensioned spline fit, and in contrast to the B-spline and Bezier fits, the curve will pass through each data point, and as the tension factor is increased, the curve between data points will approach a straight line segment. This flexibility makes it possible to smooth out inflections which are often present with ordinary polynomial spline fits. A tension factor of 0 gives a cubic spline, a factor of 1 is normal, and a factor as large as 50 will give straight line segments.