Previous: fitk1 Up: ../plot79_f.html Next: fitp1
SUBROUTINE FITK2 (T, XS, YS, N, X, Y, XP, YP, S, SIGMA) C$ (Planar Tensioned Spline Interpolation) C$ This subroutine performs the mapping of points in the C$ interval (0.0..1.0) onto a curve in the plane. The C$ subroutine FITK1 should be called earlier to determine C$ certain necessary parameters. The resulting curve has a C$ parametric representation both of whose components are C$ splines under tension and functions of the polygonal C$ arclength parameter. C$ C$ On input-- C$ C$ T........contains a REAL value of absolute value less than C$ or equal to 1.0 to be mapped to a point on the C$ curve. The sign of T is ignored and the interval C$ (0.0..1.0) is mapped onto the entire curve. If T C$ is negative, this indicates that this subroutine C$ has been called previously (with all other input C$ variables unaltered) and that this value of T C$ exceeds the previous value in absolute value. C$ With such information the subroutine is able to C$ map the point much more rapidly. Thus if the user C$ seeks to map a sequence of points onto the same C$ curve, efficiency is gained by ordering the values C$ increasing in magnitude and setting the signs of C$ all but the first, negative. C$ N........contains the number of points which were C$ interpolated to determine the curve. C$ X and Y......are arrays containing the X- and Y-coordinates C$ of the interpolated points. C$ XP and YP....are the arrays output from FITK1 containing C$ curvature information, C$ S........contains the polygonal arclength of the curve. C$ SIGMA....contains the tension factor (its sign is ignored). C$ C$ The parameters N, X, Y, XP, YP, S, and SIGMA should be C$ input unaltered from the output of FITK1. C$ C$ On output-- C$ C$ XS and YS.....contain the X- and Y-coordinates of the image C$ point on the curve. C$ T,N,X,Y,XP,YP,S and SIGMA....are unaltered. C$ C$ Author: A.K. Cline, "Scalar and Planar Valued Curve C$ Fitting Using Splines Under Tension", Comm. A.C.M. C$ 17, 218-225 (1974). (Algorithm 476). C$ C$ Modifications by Nelson H.F. Beebe, Department of Chemistry C$ Aarhus University, Aarhus, Denmark, to provide a more C$ transportable program, and to compute SINH(X) more C$ accurately than 0.5*(EXP(X)-EXP(-X)) for small arguments. C$ (09-FEB-82)