This section calculates the classical support function for convex bodies, for the specific case of the polar zonoid.
support( direction )support() returns a data frame with R rows and these columns:
the given matrix of directions
the value of the support function of the zonoid, in the given direction
the point on the boundary of the zonoid where the maximum is taken
the number of arcs for argmax. This number is always \(\le\) n.
In case of error, the function returns NULL.
an Rx(2n+1) matrix with non-zero direction vectors in the
R rows.
If the number of columns is even, a column of 0s is appended
to make it odd.
direction can also be a vector of length M,
which is then converted to a 1xM matrix.
Each direction is converted to a non-zero trignometric polynomial.
The roots are computed using trigpolyroot() and the the roots
are converted to arcs, and thus arcs.
The function boundaryfromarcs() is then used to compute
argmax, and then value.
boundaryfromarcs(),
trigpolyroot()