필터 지우기
필터 지우기

Rotating a rectangle to become aligned with x & y axis

조회 수: 2 (최근 30일)
Elie
Elie 2014년 2월 21일
답변: Star Strider 2014년 2월 21일
i have the following line polygon which draws a rectangular shape around a specific area. this rectangle is not always well aligned .
line(newBoxPolygon(:, 1), newBoxPolygon(:, 2), 'Color', 'R');
i want to rotate this rectangle until its sides are parallel with x -axis and y axis.
i tried several method such as finding the slope of one side and comparing it to slope of straight line and then doing arctan but i failed in accomplishing the task. Whats the best way to do this task

답변 (1개)

Star Strider
Star Strider 2014년 2월 21일
See if rotate does what you want.

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by