Header Ads

Header ADS

How to convert between orthogonal and oblique systems

Question:

I have a 2D coordinate system defined by two non-perpendicular axes. I wish to convert from a standard Cartesian (rectangular) coordinate system into mine. Any tips on how to go about it?


Answer:

Sure. Let's approach this in a very elementary way: with matrix algebra.

Suppose that our two new 'basis vectors' are given by (α1,α2) and (β1,β2), e.g. (1,1) and (1,0).

Then our goal is to find a linear combination of them such that we can express some given vector, which we will imaginatively denote as (x,y). In particular, this will allow us to find where a standard point is in our new, nonstandard coordinate system.

But this is nothing more than solving the system:
 for the unknown a and b values. In particular, this means that if the matrix
 is invertible (meaning that your axes are not parallel), then you can immediately find where any particular 
points are in your system.
Is that what you were looking for?
I'll make the assumption that the oblique coordinate system (u,v) with angle Ï† and the Cartesian system (x,y) share an origin.
Consider the following diagram:
oblique coordinates
We have at once the relationship x=u+h. The acute angle formed by the v-axis and h is Ï†, since alternate interior angles in a pair of parallel lines are congruent. We use trigonometry to deduce the relation y=htanφ. Eliminating h gives the equation for uu=xycotφ.
To find an expression for v, we see that this length is equal to the length of the hypotenuse of the right triangle with legs y and h. This leads to the equation y=vsinφ. Solving for v gives the equation v=ycscφ.
Thus, the conversion formulae from Cartesian to oblique coordinates with angle Ï† are
 For completeness, the formulae for converting from oblique to Cartesian coordinates are



Let us denote by "old" the usual cartesian system with orthogonal axes and by "new" the system with the skew axes (α1,α2)T,(β1,β2)T (expressed in the old system). An old vector (x,y)T can be expressed as a linear combination of the skew vectors:
 Using this equation we can 
transform vectors from the new skew system to the old orthogonal system. Note that the columns
 of the matrix A are built from the coordinates of the skew basis vectors.
In order to transform from the the old orthogonal system to new skew system we need to invert the above equation and we get:
 The above invverse matrix A1 should be computed once and then used for the
 transformation of all needed points. The inversion is possible when the respective denominator is not zero, i.e. when the new skew axes are not parallel.

Jiri's answer is wonderful, but there is a missing minus sign in upper right element in the inverted matrix. – user106231 Nov 7 '13 at 19:50

No comments

Powered by Blogger.