  We present a simple and effective method for evaluating double-and
single-layer potentials for Laplace's equation in three dimensions close to the
boundary. The close evaluation of these layer potentials is challenging because
they are nearly singular integrals. The method we propose is based on writing
these layer potentials in spherical coordinates where the point at which their
kernels are peaked maps to the north pole. An N-point Gauss-Legendre quadrature
rule is used for integration with respect to the the polar angle rather than
the cosine of the polar angle. A 2N-point periodic trapezoid rule is used to
compute the integral with respect to the azimuthal angle which acts as a
natural and effective averaging operation in this coordinate system. The
numerical method resulting from combining these two quadrature rules in this
rotated coordinate system yields results that are consistent with asymptotic
behaviors of the double- and single-layer potentials at close evaluation
distances. In particular, we show that the error in computing the double-layer
potential, after applying a subtraction method, is quadratic with respect to
the evaluation distance from the boundary, and the error is linear for the
single-layer potential. We improve upon the single-layer potential by
introducing an alternate approximation based on a perturbation expansion and
obtain an error that is quadratic with respect to the evaluation distance from
the boundary.
