Sign in to follow this  

Change Coordinates

Recommended Posts

fathom88    180
I'm given data using one coordinate method but need to plot using another one. Given: My data angle >>>>>>>>>>0 >>>>>>>>>>| >>>>>>>>>>| >>>>>>>>>>| 270 ----------------- 90 >>>>>>>>>>| >>>>>>>>>>| >>>>>>>>>>| >>>>>>>>>180 Plot: My desired angle >>>>>>90 >>>>>>| 180 --------- 0 >>>>>>| >>>>>>270 How would I convert a given angle to desired form. For instance, 90 would be 0, 180 would be 270 etc. I can't think of an easy formula. I could do it with a bunch of "if" statements but would like to avoid this. Thanks for any help. [Edited by - fathom88 on October 21, 2008 1:40:25 PM]

Share this post

Link to post
Share on other sites
nilkn    960
Notice that to transform the top system into the bottom system, you must rotate it clockwise through 90 degrees and then reflect it in the x-axis. If the angle in the top system is a, then the angle in the bottom system is a' = -(a - 90) = 90 - a.

For example:

a = 90 degrees -> a' = 0 degrees
a = 180 degrees -> a' = (90 - 180) degrees = -90 degrees = 270 degrees

Note that the angle a' produced by this formula may not necessarily be in the range [0,360).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this