Solved

Finding point coordinates after canvas rotation

Posted on 2009-05-18
1
997 Views
Last Modified: 2012-05-07
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
Comment
Question by:sstouk
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The greatest common divisor (gcd) of two positive integers is their largest common divisor. Let's consider two numbers 12 and 20. The divisors of 12 are 1, 2, 3, 4, 6, 12 The divisors of 20 are 1, 2, 4, 5, 10 20 The highest number among the c…
Prime numbers are natural numbers greater than 1 that have only two divisors (the number itself and 1). By “divisible” we mean dividend % divisor = 0 (% indicates MODULAR. It gives the reminder of a division operation). We’ll follow multiple approac…
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…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question