\subsection{Degree reduction: B-spline surface as input.}
\funclabel{s1968}
\begin{minipg1}
To compute a cubic tensor-product spline approximation
           to a given tensor product spline surface of arbitrary order,
           with error less than eeps in each of the idim components.
           The error in continuity over the start and end of
           a closed or periodic surface is only guaranteed to be within
           edgeps.
\end{minipg1} \\ \\
SYNOPSIS\\
        \> void s1968(\begin{minipg3}
            {\fov ps}, {\fov eeps}, {\fov nend}, {\fov iopen1}, {\fov iopen2}, {\fov edgeps}, {\fov iopt}, {\fov itmax}, {\fov rs}, {\fov jstat})
                \end{minipg3}\\
                \>\>    SISLSurf    \>  *{\fov ps};\\
                \>\>    double \> {\fov eeps}[\,];\\
                \>\>    int    \>  {\fov nend}[\,];\\
                \>\>    int    \>  {\fov iopen1};\\
                \>\>    int    \>  {\fov iopen2};\\
                \>\>    double \> {\fov edgeps}[\,];\\
                \>\>    int    \>  {\fov iopt};\\
                \>\>    int    \>  {\fov itmax};\\
                \>\>    SISLSurf    \>  **{\fov rs};\\
                \>\>    int    \>  *{\fov jstat};\\
\\
ARGUMENTS\\
	\>Input Arguments:\\
        \>\>    {\fov ps}\> - \>  \begin{minipg2}
                     Pointer to surface.
                               \end{minipg2}\\
        \>\>    {\fov eeps}\> - \>  \begin{minipg2}
                     Array (length idim) containing the max. permissible
                  deviation of the approximation from the given data
                  points, in each of the components. More specifically,
                  the approximation will not deviate more than eeps(kdim)
                  in component no. kdim, from the bilinear approximation
                  to the data.
                               \end{minipg2}\\[0.8ex]
        \>\>    {\fov nend}\> - \>  \begin{minipg2}
                     Array (length 4) giving the no. of derivatives to be
                  kept fixed along each edge of the bilinear interpolant.
                  The numbering of the edges is the same as for edgeps below.
                  All the derivatives of order $< (nend(i)-1)$ will be kept
                  fixed along the edge $i$. Hence $nend(i)=0$ indicates that
                  nothing is to be kept fixed along edge $i$.
                  To be kept fixed here means to have error less than edgeps.
                  In general, it is impossible to remove any knots and keep
                  an edge completely fixed.
                               \end{minipg2}\\[0.8ex]
        \>\>   {\fov iopen1}\> - \> Open/closed parameter in first direction.\\
          \>\>\>\>  $= 1$  : Produce open surface.\\
          \>\>\>\>  $= 0$ : Produce closed, non-periodic surface if possible.\\
          \>\>\>\>  $= -1$ : Produce closed, periodic surface\\
        \>\>\>\>  \begin{minipg2}
                  NB! The surface will be closed/periodic only if the first 
                      and last column of data points are (approximately) equal.
                               \end{minipg2}\\[0.8ex]
        \>\>   {\fov iopen2}\> - \> Open/closed parameter in second direction.\\
          \>\>\>\>  $= 1$  : Produce open surface.\\
          \>\>\>\>  $= 0$ : Produce closed, non-periodic surface if possible.\\
          \>\>\>\>  $= -1$ : Produce closed, periodic surface\\
        \>\>\>\>  \begin{minipg2}
                  NB! The surface will be closed/periodic only if the first 
                      and last row of data points are (approximately) equal.
                               \end{minipg2}\\[0.8ex]
        \>\>    {\fov edgeps}\> - \>  \begin{minipg2}
                     Array (length idim*4) containing the max. deviation from
                  the bilinear interpolant which is acceptable along the
                  edges of the surface.
                  edgeps(1,i):edgeps(idim,i) gives the tolerance along
                  the edge corresponding to the i-th parameter having
                  one of it`s extremal-values.
                     \end{minipg2}\\[0.8ex]
          \>\>\>\> $i=1$: min value of first parameter.\\ 
          \>\>\>\> $i=2$: max value of first parameter.\\
          \>\>\>\> $i=3$: min value of second parameter.\\
          \>\>\>\> $i=4$: max value of second parameter.\\
          \>\>\>\>  \begin{minipg2}
                  edgeps(kp,i) will only have significance if $nend(i)>0$.
                               \end{minipg2}\\[0.8ex]
        \>\>    {\fov iopt}\> - \>  \begin{minipg2}
                  Flag indicating the order in which the data-reduction
                  is to be performed:
                               \end{minipg2}\\[0.8ex]
          \>\>\>\> $=1$: Remove knots in parameter 1 only.\\
          \>\>\>\> $=2$: Remove knots in parameter 2 only.\\
          \>\>\>\> $=3$: Remove knots first in parameter 1 and then in 2.\\
          \>\>\>\> $=4$: Remove knots first in parameter 2 and then in 1.\\
        \>\>    {\fov itmax}\> - \>  \begin{minipg2}
                    Max. no. of iterations in the data-reduction..
                               \end{minipg2}\\[0.8ex]
\\
	\>Output Arguments:\\
        \>\>    {\fov rs}\> - \>  \begin{minipg2}
                     Pointer to surface.
                               \end{minipg2}\\
        \>\>    {\fov jstat}     \> - \> Status messages\\
                \>\>\>\>\>              $> 0$   : Warning.\\
                \>\>\>\>\>              $= 0$   : Ok.\\
                \>\>\>\>\>              $< 0$   : Error.\\
\\
EXAMPLE OF USE\\
		\>      \{ \\

                \>\>    SISLSurf    \>  *{\fov ps};\\
                \>\>    double \> {\fov eeps}[\,];\\
                \>\>    int    \>  {\fov nend}[\,];\\
                \>\>    int    \>  {\fov iopen1};\\
                \>\>    int    \>  {\fov iopen2};\\
                \>\>    double \> {\fov edgeps}[\,];\\
                \>\>    int    \>  {\fov iopt};\\
                \>\>    int    \>  {\fov itmax};\\
                \>\>    SISLSurf    \>  **{\fov rs};\\
                \>\>    int    \>  *{\fov jstat};\\                \>\>    \ldots \\
        \>\>s1968(\begin{minipg4}
            {\fov ps}, {\fov eeps}, {\fov nend}, {\fov iopen1}, {\fov iopen2}, {\fov edgeps}, {\fov iopt}, {\fov itmax}, {\fov rs}, {\fov jstat});
                \end{minipg4}\\
                \>\>    \ldots \\
		\>      \}
\end{tabbing}
