У нас вы можете посмотреть бесплатно C++: designing algorithm to find Axes Align Bounding Box for (too long to type here; see description или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Consider an arbitrary rectangle (corners P0 and P1). Pick a random point inside that rectangle (P2). Draw two perpendicular lines through that point, under an otherwise arbitrary rotation relative to the first rectangle (one line going through Q2 on a circle around P2, in direction D2; the other line perpendicular to that). Calculate the four intersections points of those two lines with the first rectangle (stored in `plot_ips`). (this is were we are in the code now) Draw the smallest rectangle, aligned with the two perpendicular lines, that is guaranteed to contain any rectangle having those four points on any of its edges, but limited to rectangles with an aspect ratio of 2 (unless there is no other way; the aspect limit is only there to avoid needing infinitely large rectangles).