Vectors and coordinate transformations

Hi all,

Got a problem here I was hoping you could help me with.

I have a point P in a spherical coordinate system, and I'll let the origin be called the point Q to simplify my explanation. The distance from Q to P is fixed, H. but P can rotate around Q, so that are variable.

Now, take P to be the origin of a second spherical coordinate system, from which distance measurements are made to arbitrary points . What I want to do is to convert the arbitrary distance measurements from point P into cartesian coordinates relative to the "Q" coordinate system - baring in mind that P may change position relative to Q.

I can convert from spherical to cartesian coordinates around the P origin using the formulas:

And I can get the cartesian coordinates for P within the Q coordinate system, using the same formulas. The problem is that the orientation of the P coordinate system changes depending on the location of P (The angles , and ). If the vector QP points in the positive z direction of the Q coordinate system (P lies on the z-axis), then take the x-axis (Or datum point) of the P coordinate system to be parallel with the x-axis of the Q coordinate system, and pointing in the positive direction.

The unit vector **i**=[1,0,0] in the P system (Pointing along positive x-axis), will remain perpendicular to vector QP (With Q, P, and lying in the same plane), as the point P is free to orbit around Q. This is what I can't get my head around, but my maths is rusty to say the least, and I have an inkling I will need a vector calculation of some sort, like dot product/cross product, but can't think how to go about it.

I hope I made my explanation clear enough for you to visualise the situation - had a hard time trying to describe it. :)

Cheers

Re: Vectors and coordinate transformations

If I understand your problem correctly, you need to do vector addition. The coordinates of point as measured in the coordinate system are

The coordinates of the point in the coordinate system, which I'll call point as measured in the coordinate system are as you've written: . Using vector addition, the coordinates of point as measured in the system must be

From there, you can form the full expression as a function of the distances and angles you've been given. Can you finish?

Re: Vectors and coordinate transformations

Thanks for the reply. The thing that was stumping me was the fact that as P changes position, the orientation of the P coordinate system changes in a way that depends on P's position around a sphere centered on the origin of the Q coordinate system. In the 'default' state, P's axes are aligned in the same way as Q's axes so that respective x-y, x-z, and y-z planes are parallel when P is in the 'default' position.

I realized after thinking a little more that as P moves around the sphere, away from its default position, the difference in angular displacement of the vector from P to Q in the new position, to the vector from P to Q in the default position, is equal to the change in angle of the axes of the P coordinate systems. So when converting points in the P coordinate system from spherical to Cartesian coordinates in order to allow me to do the vector addition you mentioned, all I had to do was to first subtract the angular displacements of the PQ vector (From the Q coordinate system) from the spherical angles to the point in the P coordinate system.

I probably could have explained that better, but hopefully it will help someone, Thanks anyway