Compute the oriented minimum bounding box of set of points in the XY plane.


points (array_like[point]) – XY(Z) coordinates of the points.


list[[float, float, float]] – XYZ coordinates of 8 points defining a box.


The oriented (minimum) bounding box (OBB) is computed using the following procedure:

  1. Compute the convex hull of the points.

  2. For each of the edges on the hull:

    1. Compute the s-axis as the unit vector in the direction of the edge

    2. Compute the othorgonal t-axis.

    3. Use the start point of the edge as origin.

    4. Compute the spread of the points along the s-axis. (dot product of the point vecor in local coordinates and the s-axis)

    5. Compute the spread along the t-axis.

    6. Determine the side of s on which the points are.

    7. Compute and store the corners of the bbox and its area.

  3. Select the box with the smallest area.