This creates an object of class "funxy".
  This is a simple mechanism for handling a function
  of spatial location \(f(x,y)\) to make it easier to display
  and manipulate.
f should be a function in the R language.
  The first two arguments of f must be named x and y
  respectively.
W should be a window (object of class "owin") inside which the
  function f is well-defined.
The function f should be vectorised: that is,
  if x and y are numeric vectors of the same length
  n, then v <- f(x,y) should be a vector of length
  n.
The resulting function g <- funxy(f, W) has the same formal
  arguments as f and can be called in the same way,
  v <- g(x,y) where x and y are numeric vectors.
  However it can also be called as v <- g(X), where X is a point pattern
  (object of class "ppp" or "lpp")
  or a quadrature scheme (class "quad");
  the function will be evaluated at the points of X.