I have a list of points depicting a shape. In C# need to find the Minimum Bounding Rectangle (MBR) for that shape. However, all the solutions I have been able to find result in a MBR that is relative to the x and y axis, not to the shape itself. As an example, (the shape is not fixed, could be anything);
What I would really like is something like this;
Currently I am using the getBoundingRectangle in accord.net. The only thing I can think of would be to try 1->90 degree rotations, until the size of the bounding rectangle was minimized.
EDIT: I have found a good reference for the problem here;
It has the code for the solution in processing.js here (see GenBox);
Solution in processing.js But I would really like a C# solution