 Help with data on cartesian grid

Can someone point me to what would be a good tutorial to help with what I think is pretty basic stuff. I have data files that are in CSV format. Each row contains three pieces of data, the X coordinate, Y coordinate, and the value for the data at that coordinate/point. So, each data file is essentially data values on a 53x53 cartesian grid (where X,Y go from -26 to 26). I've figured out how to plot the data with ggplot. However, I'd like to convert the data from cartesian to polar coordinates (r, theta), then rotate the "grid" by adding or subtracting a given theta value. I'd need to do additional work on the data after that, but am just trying to figure out how to get started and move in that direction. Any suggestions on good tutorials (or specific info) would be appreciated.

Let's simplify just a bit for illustration and take a cartesian grid in the +/+ quadrant. It's easily extended.

From the origin(0,0), for every (x,y) we can calculate two values:

1. The radius -- the length of the line connecting the origin with (x,y)
2. An angle from the ordinate at (0,x) to (x,y), conventionally called \theta

Which is a right triangle, r = \sqrt{x^{2} + y^{2}} and \theta = atan2(y,x)

(See the wiki

For your rotation, do you want to rotate the axes or the points? If you just want to rotate the axes, there's no need for the polar conversion. See Wolfram for an explanation of the straightforward matrix operations

Thank you. I'd be looking to rotate the points, so their theta values would change based upon a specific value I'd provide.

Thank you, I will take a look.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.