alpha
base-line of the (rotated) polygon at \(x = \alpha\) (see
Sommariva and Vianello (2007) for an explication). If NULL (default),
the midpoint of the x-range of each polygon is chosen if no rotation
is performed, and otherwise the \(x\)-coordinate of the rotated point
"P" (see rotation). If f has its maximum value at the
origin \((0,0)\), e.g., the bivariate Gaussian density with zero mean,
alpha = 0 is a reasonable choice.
rotation
logical (default: FALSE) or a list of points
"P" and "Q" describing the preferred direction. If
TRUE, the polygon is rotated according to the vertices "P" and
"Q", which are farthest apart (see Sommariva and Vianello, 2007). For
convex polygons, this rotation guarantees that all nodes fall inside the
polygon.
engine
character string specifying the implementation to use.
Up to polyCub version 0.4-3, the two-dimensional nodes and weights
were computed by R functions and these are still available by setting
engine = "R".
The new C-implementation is now the default (engine = "C") and
requires approximately 30% less computation time.
The special setting engine = "C+reduce" will discard redundant nodes
at (0,0) with zero weight resulting from edges on the base-line
\(x = \alpha\) or orthogonal to it.
This extra cleaning is only worth its cost for computationally intensive
functions f over polygons which really have some edges on the
baseline or parallel to the x-axis. Note that the old R
implementation does not have such unset zero nodes and weights.