Index: /trunk/doc/pslib/ChangeLogADD.tex
===================================================================
--- /trunk/doc/pslib/ChangeLogADD.tex	(revision 3171)
+++ /trunk/doc/pslib/ChangeLogADD.tex	(revision 3172)
@@ -24,3 +24,5 @@
 \begin{itemize}
 \item Added section on inverse and combined transformations.
+\item Added \code{PS_RESAMPLE_LANCZOS[234]}, dropped
+  \code{PS_RESAMPLE_LAGRANGE}.
 \end{itemize}
Index: /trunk/doc/pslib/psLibADD.tex
===================================================================
--- /trunk/doc/pslib/psLibADD.tex	(revision 3171)
+++ /trunk/doc/pslib/psLibADD.tex	(revision 3172)
@@ -1,3 +1,3 @@
-%%% $Id: psLibADD.tex,v 1.58 2005-01-26 01:09:07 price Exp $
+%%% $Id: psLibADD.tex,v 1.59 2005-02-09 21:54:44 price Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1104,7 +1104,40 @@
 (5,5).
 
-\subparagraph{Sinc Interpolation ({\tt PS\_RESAMPLE\_SINC})}
-
-\subparagraph{Lagrange Interpolation ({\tt PS\_RESAMPLE\_LAGRANGE})}
+\subparagraph{Sinc Interpolation ({\tt PS\_RESAMPLE\_LANCZOS[234]})}
+
+Because it would be slow to specify the size of the kernel
+dynamically, we specify three hard-coded kernel sizes: 4, 6 and 8
+pixels in each dimension (a kernel of size 2 pixels in each dimension
+is handled by the bilinear interpolation).  These correspond to the
+options \code{PS_RESAMPLE_LANCZOS2}, \code{PS_RESAMPLE_LANCZOS3} and
+\code{PS_RESAMPLE_LANCZOS4}, respectively.
+
+Given a position on the input image, $(x_0,y_0)$, a kernel is derived
+according to pixels local to the position:
+\begin{equation}
+  h(x,y) = {\rm sinc}(\pi \delta x) {\rm sinc}(\pi \delta x / N) \rm{sinc}(\pi \delta y) \rm{sinc}(\pi \delta y / N)
+\end{equation}
+where
+\begin{eqnarray}
+  \delta x & = & x - x_0 \\
+  \delta y & = & y - y_0 \\
+  {\rm sinc}(z) & = & \sin(z)/z
+\end{eqnarray}
+and $N$ corresponds to the choice of kernel size.  For $N = 2$, the
+kernel size is 4 pixels in each dimension (i.e., $-2 < \delta x \le
+2$).  For $N = 3$, the kernel size is 6 pixels in each dimension
+(i.e., $-3 < \delta x \le 3$).  For $N = 4$, the kernel size is 8
+pixels in each dimension (i.e., $-4 < \delta x \le 4$).
+
+The interpolated value at the given position, $(x_0,y_0)$, is then
+simply the dot product of the kernel and the fluxes:
+\begin{equation}
+  f(x_0,y_0) = \sum_R f(x,y) h(x,y)
+\end{equation}
+where $R$ is the region defined by the kernel size, and $f(x,y)$ is
+the flux at the pixel position.
+
+For further information, see the
+\href{http://terapix.iap.fr/IMG/pdf/swarp.pdf}{SWarp manual}.
 
 \paragraph{Image Cuts and Slices}
@@ -1701,6 +1734,4 @@
 \subsection{Missing and Todo}
 
-\tbd{define SINC, LAGRANGE interpolation}
-
 \tbd{define sunrise, sunset, sun position}
 
