Previous: fitp1 Up: ../plot79_f.html Next: fitpb2
SUBROUTINE FITP2 (T, XS, YS, N, X, Y, XP, YP, S, SIGMA)
C$ (Closed Curve Tensioned Spline Interpolation)
C$ This subroutine performs the mapping of points in the
C$ interval (0.0..1.0) onto a closed curve in the plane.
C$ SUBROUTINE FITP1 should be called earlier to determine
C$ certain necessary parameters. The resulting curve has a
C$ parametric representation both of whose components are
C$ periodic splines under tension and functions of the
C$ polygonal arclength parameter.
C$
C$ On input--
C$
C$ T..............contains a REAL value of absolute value less
C$ than or equal to 1.0 to be mapped to a point
C$ on the curve. The sign of T is ignored and
C$ the interval (0.,1.) is mapped onto the
C$ entire closed curve. If T is negative this
C$ indicates that the subroutine has been
C$ called previously (with all other input
C$ variables unaltered) and that this value of
C$ T exceeds the previous value in absolute
C$ value. With such information the subroutine
C$ is able to map the point much more rapidly.
C$ Thus if the user seeks to map a sequence of
C$ points onto the same curve, efficiency is
C$ gained by ordering the values increasing in
C$ magnitude and setting the signs of all but
C$ 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
C$ Y-coordinates of the interpolated points,
C$ XP and YP......are the arrays output from FITP1 containing
C$ curvature information,
C$ S..............contains the polygonal arclength of the
C$ curve,
C$ SIGMA..........contains the tension factor (its sign is
C$ ignored).
C$
C$ The parameters N, X, Y, XP, YP, S and SIGMA should be input
C$ unaltered from the output of FITP1.
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,
C$ XP, YP, S and
C$ SIGMA..........are unaltered.
C$
C$ Author: A.K. Cline, "Scalar and Planar Valued Curve Fitting
C$ Using Splines Under Tension", Comm. A.C.M. 17,
C$ 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$ (20-JAN-83)