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

1 回表示 (過去 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 Center および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by