Previous: filxa3 Up: ../plot79_f.html Next: fitbs2
SUBROUTINE FITAP (XNEW,YNEW,NPNEW, X,Y,NP, DELTA)
C$ (Approximating Vectors)
C$ This routine finds a reduced set of points which
C$ approximate a curve defined by a set of points (X(K),Y(K),
C$ K=1,NP). The accuracy of the approximation is controlled
C$ by specifying the maximum deviation, "DELTA", allowed
C$ between the points and the approximating vectors. For
C$ typical data, the number of these vectors is found to be
C$ inversely proportional to the square root of DELTA. This
C$ routine may prove useful in determining a reduced set of
C$ points which can satisfactorily represent a much larger
C$ set, but for which plotting time is excessive. The
C$ arguments are:
C$
C$ XNEW(*).....New X values returned.
C$ YNEW(*).....New Y values returned.
C$ NPNEW.......Number of new (X,Y) pairs returned. Space must
C$ be available in XNEW(*) and YNEW(*) to store at
C$ most NP items, since NPNEW .LE. NP on return.
C$ X(*)........Old X values.
C$ Y(*)........Old Y values.
C$ NP..........Number of old (X,Y) values input.
C$ DELTA.......Maximum deviation between the data points
C$ and the required vector approximation (input).
C$
C$ Author: D.H. McLain, Algorithm 100, "Vector Approximation
C$ to Curves", Computer Journal 21, #2 (May 1978), pp.
C$ 178-180.
C$ (04-MAR-82)