Rotate a set of 2D points by changing the first element into origin
2 views (last 30 days)
Show older comments
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 Comments
Adam
on 18 Apr 2019
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
on 18 Apr 2019
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)
Answers (0)
See Also
Categories
Find more on Interactions, Camera Views, and Lighting in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!