Solved

Finding point coordinates after canvas rotation

Posted on 2009-05-18
1
993 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Article by: Nadia
Suppose you use Uber application as a rider and you request a ride to go from one place to another. Your driver just arrived at the parking lot of your place. The only thing you know about the ride is the license plate number. How do you find your U…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now