This function generates a rectangular grid of locations in the plane,
tests whether each of these locations lies inside the
w, and stores the results as a binary pixel image
or `mask' (an object of class
The most common use of this function is to approximate the shape
of another window
w by a binary pixel image. In this case,
we will usually want to have a very fine grid of pixels.
This function can also be used to generate a coarsely-spaced grid of
locations inside a window, for purposes such as subsampling
The grid spacing and location are controlled by the
which are mutually incompatible.
eps is given, then the grid spacing will be
eps in both the $x$ and $y$ directions.
dimyx is given, then the pixel grid will be an
$m \times n$ rectangular grid
where $m, n$ are given by
dimyx is the number of
pixels in the $y$ direction, and
dimyx is the number
in the $x$ direction.
xy is given, then this should be a structure
containing two elements
y which are the
vectors of $x$ and
y coordinates of the margins
of the grid. The pixel coordinates will be generated
from these two vectors. In this case
w may be omitted.
xy is given,
the pixel raster dimensions are obtained from
There is no inverse of this function!