Original Post
I am having a little trouble trying to implement the rotating calipers algorithm to find the smallest perimeter rectangle by the steps provided at the following site. I don't know if I am 100% clear on the steps given. I already have access to a geometric library that allows me to create points, lines, run intersection tests, etc. Steps as I understood/misunderstood them... 1) I am assuming this step requires that I compute the AABB for the convex polygon. DONE. 2) I am assuming that these are the edges of my AABB. DONE. 3) I am assuming coincidental means checking to see if the edges of the polygon are identical to any edge of my AABB, going by the Coincidental definition here. I guess this means if they share both the same start and end points. Then get the perimeter of the AABB. 4) Rotate the lines clockwise until one or more coincide with the polygons edges? Rotate by how many degrees? 1 degrees, 0.5 degrees? This algorithm could get slow real fast depending on precision requirements. Is there a better way to rotate. 5) Compute the perimeter of the new rectangle? What new rectangle? How does the initial rectangle we start out with get changed. Steps 6 and 7 understood without any problem.