Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Finding point coordinates after canvas rotation

Posted on 2009-05-18
Medium Priority
1,005 Views
I have an image with known coordinates of multiple points within it.
I need to find a new position for each of the point after I rotate the canvas of the image a certain degree around the center.
Anyone has a way to calculate it?
I am working on a project of mapping multiple land-maps to position on Google-map but the axis is not matching.
Rotating the image itself is not good as it distorts the text.
Best way is to virtually rotate the image to match the google-mp alignment and then draw poligons on google-map after rotation.
But I need to find coordinates of each point after I rotate the original image around its center.
I know I shoudl probably treat the image as a circle and re-calculate each point after finding its center but I need a formula.
0
Question by:sstouk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
1 Comment

LVL 84

Accepted Solution

ozo earned 2000 total points
ID: 24414090
xnew=center+((xold-center)*cos(degrees*pi/180)-(yold-center)*sin(degrees*180/pi))
ynew=center+((yold-center)*cos(degrees*pi/180)+(xold-center)*sin(degrees*180/pi))
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Okay. So what exactly is the problem here? How often have we come across situations where we need to know if two strings are 'similar' but not necessarily the same? I have, plenty of times. Until recently, I thought any functionality like that wo…
One of Google's most recent algorithm changes affecting local searches is entitled "The Pigeon Update." This update has dramatically enhanced search inquires for the keyword "Yelp." Google searches with the word "Yelp" included will now yield Yelp a…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month7 days, 3 hours left to enroll