Rotate a set of 2D points by changing the first element into origin

조회 수: 2 (최근 30일)
Jiajie Zhang
Jiajie Zhang 2019년 4월 18일
댓글: Walter Roberson 2019년 4월 18일
I have a set of point, each point has 3 attributions,(x,y,direction)
such as:
(1,2,45) (5,7,50)(9,6,120)
I want to consider the first point (1,2,45) as the orgin, and scale the other two points to a new coordition system.
for x and y, I can directly minus the values of the fist point, but I don't know how to deal with the angle.
How can I implement this?
Thank you so much.
  댓글 수: 2
Adam
Adam 2019년 4월 18일
What is wrong with subtracting the angle too? With some maths, if desired to ensure the output is in your preferred range of angles (e.g. 0-360 or -180 to 180 or whatever).
If a direction of 45 becomes the origin then doesn't a direction of 50 become a direction of 5?
Walter Roberson
Walter Roberson 2019년 4월 18일
We cannot currently say. The angles look to be absolute rather than relative, and of no obvious purpose as there is no length associated with the angle. They do not talk about direction to get to the next point: traveling 45 degrees from (1,2) would get you (5,6) not (5,7)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactions, Camera Views, and Lighting에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by