Converting a rotation to spherical coordinates

Started by
9 comments, last by Omid Ghavami 17 years, 1 month ago
Quote:Original post by Numsgil
That looks like a solution! I'll give it a try and see waht I get. In the mean time, where did the base vectors come from? I've never seen them before, and I've been working with sphericeal coordiantes casually for a while, not to mention having covered them in calculus.


Any orthogonal curvilinear coordinate system has a base. You can find the basis for a curvilinear coordinate system by taking the derivative of a vector in cartesian coordinates in terms of the curvilinear coordinate components with respect to each of the components. And then normalizing.
For example in the case of spherical coordinates you have:

vector x given by
x1 = r * sin(a) * cos(b)
x2 = r * sin(a) * sin(b)
x3 = r * cos(a)

er = dx/dr / hr = [sin(a) * cos(b), sin(a) * sin(b), cos(a)] / hr
hr = | [sin(a) * cos(b), sin(a) * sin(b), cos(a)] | = 1

er = [sin(a) * cos(b), sin(a) * sin(b), cos(a)]

ea = dx/da / ha = [r * cos(a) * cos(b), r * cos(a) * sin(b), - r * sin(a)] / ha

ha = |[r * cos(a) * cos(b), r * cos(a) * sin(b), - r * sin(a)]| = r

ea = [cos(a) * cos(b), cos(a) * sin(b), - sin(a)]

eb = dx/db / hb = [-r * sin(a) * sin(b), r * sin(a) * cos(b), 0] / hb

hb = |[-r * sin(a) * sin(b), r * sin(a) * cos(b), 0]| = r * sin(a)

eb = [-sin(b), cos(b), 0]
Best regards, Omid

This topic is closed to new replies.

Advertisement