PDA

View Full Version : Vectors along surface of a sphere


Dissonance in E
Sep8-11, 10:56 AM
I assume this is rather elementary so I'll be brief.

I have a point in an xyz coordinate system, this point is assumed to lie on the surface of a sphere with radius R. Suppose I know the coordinates of this point, how would I go about solving for the unitvectors pointing "due north", "due west", "due south" and "due east" along the surface of the sphere at this point ?

Thanks.

MisterX
Sep8-11, 01:11 PM
If a surface is parameterized by

\vec{f}(u, v) = \vec{r}

then

\frac{\partial\vec{f}(u, v)}{\partial u}

is a vector tangent to the surface in the u direction at that point

Normalizing such a vector will yield a unit vector.

Dissonance in E
Sep8-11, 01:33 PM
Is there a way to solve the vectors using just a point on the axis and a unit vector towards the direction we want indicated ? I found something simlar on the web, will this work?

"Let r2u be a unit vector from the center of the earth's surface to
point 2. This unit vector is just a vector that's one unit long, but
pointing in the same direction as the vector r2. Let zu be the unit
vector in the z direction. Then you can construct a vector that
points "due north" along the earth's surface from point 2 as:

north pointing vector = zu - (zu.r2u)r2u

The period in this expression connotes the scalar product of two
vectors. Similarly, a vector pointing along the earth's surface from
point 2 toward point 1 (on a great circle) can be written as:

heading vector = r1u - (r1u.r2u)r2u
"

http://mathforum.org/library/drmath/view/52049.html

LCKurtz
Sep8-11, 03:38 PM
Let V = ai + bj + ck be the position vector to your point. Take the cross product
W = k cross V which will be perpendicular to both the k direction and your position vector V. Now take D = W cross V. This will be perpendicular to W, hence in the plane of k and V and it is perpendicular to V, so it is pointing either "North" or "South". Use D or -D, whichever has a positive z component.

Dissonance in E
Sep8-11, 04:24 PM
ok so if i do something like this on matlab:

v = [3,3,3];
k = [0,0,1];
w = cross(k,v);
d = cross(w,v);
d = d/norm(d)

d =

0.4082 0.4082 -0.8165

i should get a unit vector d on point v that points towards point k ? will this work for arbitrary values of v & k ?

LCKurtz
Sep8-11, 07:13 PM
ok so if i do something like this on matlab:

v = [3,3,3];
k = [0,0,1];
w = cross(k,v);
d = cross(w,v);
d = d/norm(d)

d =

0.4082 0.4082 -0.8165

i should get a unit vector d on point v that points towards point k ? will this work for arbitrary values of v & k ?

The z component came out negative, so you want the opposite direction. But as I look at it more closely, if you let w = cross(v,k) instead of cross(k,v), you should get the right direction in the first place. To be sure you understand what the answer represents, if you draw the vector d with its tail at your original point on the sphere, d will be tangent to the sphere about the origin containing your original point and will point to the direction of the axis determined by the k vector, in this case the positive z axis.

Dissonance in E
Sep9-11, 04:29 AM
All right, thanks a lot.