How can I devise an R-code that can derive a rectangular bounding box (with 90-degree angle on each corner) for a set of points with arbitrary orientation? e.g. if the 2 longer edges have a 45-degree angular direction, or 15-degree, or any angle. It seems to have been solved on the paper below, but I cannot read their mathematical notation.
It is partially solved on the link below, however, it looks only for the "minimum area rectangle" and not the minimum bounding rectangle for a specified orientation.