  This paper presents a scheme to deal accurately and efficiently with complex
angular masks, such as occur typically in galaxy surveys. An angular mask is
taken to be an arbitrary union of arbitrarily weighted angular regions bounded
by arbitrary numbers of edges. The restrictions on the mask are (i) that each
edge must be part of some circle on the sphere (but not necessarily a great
circle), and (ii) that the weight within each subregion of the mask must be
constant. The scheme works by resolving a mask into disjoint polygons, convex
angular regions bounded by arbitrary numbers of edges. The polygons may be
regarded as the `pixels' of a mask, with the feature that the pixels are
allowed to take a rather general shape, rather than following some predefined
regular pattern. Among other things, the scheme includes facilities to compute
the spherical harmonics of the angular mask, and Data-Random <DR> and
Random-Random <RR> angular integrals. A software package mangle which
implements this scheme, along with complete software documentation, is
available at http://casa.colorado.edu/~ajsh/mangle/ .
