I Is the Jacobian Directional Derivative for a Sphere Correct?

rabbed
Messages
241
Reaction score
3
Hi

For a sphere:

x = r*cos(a)*sin(o)
y = r*sin(a)
z = -r*cos(a)*cos(o)

where r is radius, a is latitude and o is longitude, the directional derivative (dx,dy,dz) is the jacobian multiplied by a unit vector (vx,vy,vz), right? So i get:

dx = cos(a)*sin(o)*vx - r*sin(a)*sin(o)*vy + r*cos(a)*cos(o)*vz
dy = sin(a)*vx + r*cos(a)*vy
dz = -cos(a)*cos(o)*vx + r*sin(a)*cos(o)*vy + r*cos(a)*sin(o)*vz

Is this correct?

When I visualize this with a computer program I assume x to the right, y upwards and z into the screen.
I use (vx,vy,vz) := (0, cos(v), sin(v)) for an increasing angle variable v to get a unit length vector where vx = 0 because as I understand (vx,vy,vz) should be a vector in (r,a,o) space and r is not changing.

Then (dx,dy,dz) is pointing out from some point p on the sphere and rotate in a plane (seemingly) tangent to the sphere. When p is close to the poles, the length of (dx,dy,dz) seems to change as v goes from 0 to 2*pi, otherwise it looks like the length is more constant during a revolution around p.

Can someone expain if this is correct behaviour?
 
Last edited:
Physics news on Phys.org
Does it really matter? The math is still the same, just with different expressions.
The aim of my question is to get intuition about jacobians and directional derivatives.
 
I was thinking that the signs would be wrong and hence the directions so to me I'd want it to be correct.

My vector analysis is a bit rusty. I've been trying to figure out how to best answer your question but no luck yet. However, a math mentor should see this and comment shortly.
 
Okay,
thanks jedishrfu
 
I'm wondering how to picture it.

First, what space is the unit vector (vx,vy,vz) in? Since the number of columns in the jacobian and hence the number of dimensions in the unit vector comes from (r,a,o) space, I'm assuming it's a vector in that space.

Second, how does my choice of (vx,vy,vz) change (dx,dy,dz)? If (vx,vy,vz) is a vector in (r,a,o) space, does it make sense to think of it as (r,a,o) space or should I think of it as a new space with the same number of dimensions?
Does (dx,dy,dz) have the same direction as (vx,vy,vz)?
 
Last edited:
I'm puzzled by the original question. Normally a directional derivative is taken of some real-valued function on some space. I am not seeing a real-valued function anywhere.
 
rabbed said:
I'm wondering how to picture it.

First, what space is the unit vector (vx,vy,vz) in? Since the number of columns in the jacobian and hence the number of dimensions in the unit vector comes from (r,a,o) space, I'm assuming it's a vector in that space.
I'll take a stab at it. This is much easier to keep track of if you stay with right hand systems and stick to some standard direction conventions. But I'll try to use your definitions. (vx,vy,vz) is in the "locally-level" coordinate system. It's called that because the XYll plane is tangent to the surface of the Earth at that latitude & longitude. (0,0,0)ll is the point on the surface of the Earth at that latitude & longitude. Yll points toward the North Pole (increasing latitude) and Xll points East (increasing longitude), and Zll points up from the center of the Earth. (This is a right-hand system, so I haven't checked the signs in your equations).

Then the (x,y,z) if your equations are in what is called the "Earth Centered, Earth Fixed" coordinate system. (0,0,0)ecef is at the center of the Earth. Yecef points to the North Pole. Xecef points to the intersection of the Equator and the Prime Meridian. Zecef points to a location in the Atlantic Ocean (I think).

I'm not sure if I got the details right, but I hope this gives you the idea.
 
Last edited:
  • #10
FactChecker - Can I express it like this?
(vx,vy,vz) are coordinates in a cartesian coordinate system C placed inside the destination space.
C is placed at the point that we want to derivate on the surface and is rotated so that it's x-axis vector aims in the destination space direction where the first coordinate of the source space increases from that point, and similar for the other axes?
Was is possible to understand that?

zinq - I think both dx, dy and dz are directional derivatives, if I've understood correctly.
 
  • #11
rabbed said:
Hi

For a sphere:

x = r*cos(a)*sin(o)
y = r*sin(a)
z = -r*cos(a)*cos(o)

where r is radius, a is latitude and o is longitude, the directional derivative (dx,dy,dz) is the jacobian multiplied by a unit vector (vx,vy,vz), right? So i get:

dx = cos(a)*sin(o)*vx - r*sin(a)*sin(o)*vy + r*cos(a)*cos(o)*vz
dy = sin(a)*vx + r*cos(a)*vy
dz = -cos(a)*cos(o)*vx + r*sin(a)*cos(o)*vy + r*cos(a)*sin(o)*vz

Is this correct?
This looks wrong to me. Since (x,y,z) is scaled by multiplier r, my immediate reaction is that (dx,dy,dz) should also be scaled by the multiplier r. Your equations don't have that. Your first term in each equation needs 'r*'. There may be other problems. You should check those calculations.

See the last section of http://www.moog-crossbow.com/Literature/Application_Notes_Papers/Datum_Transformations_of_Inertial_Reference_Frames.pdf . That is going from ECEF to the LL system, so you need to take the inverse of the transformation matrix.
 
Last edited by a moderator:
  • #12
FactChecker said:
This looks wrong to me. Since (x,y,z) is scaled by multiplier r, my immediate reaction is that (dx,dy,dz) should also be scaled by the multiplier r. Your equations don't have that. Your first term in each equation needs 'r*'. There may be other problems. You should check those calculations.

For the first row of the jacobian:
In the first column i derivate r*cos(a)*sin(o) wrt r which gets me cos(a)*sin(o)
In the second column i derivate r*cos(a)*sin(o) wrt a which gets me -r*sin(a)*sin(o)
In the third column i derivate r*cos(a)*sin(o) wrt o which gets me r*cos(a)*cos(o)

Is that wrong?
 
  • #13
rabbed said:
For the first row of the jacobian:
In the first column i derivate r*cos(a)*sin(o) wrt r which gets me cos(a)*sin(o)
In the second column i derivate r*cos(a)*sin(o) wrt a which gets me -r*sin(a)*sin(o)
In the third column i derivate r*cos(a)*sin(o) wrt o which gets me r*cos(a)*cos(o)

Is that wrong?
Oh. Sorry. You are doing something different from what I was thinking. Then I think you should be using (dr, da, do) instead of (vx, vy, vz).
 
  • #14
Okay

Yeah, maybe it got confusing with (dx, dy, dz), but it does have with delta to do.
But just to be clear, with (dr, da, do) you still mean a unit vector, right?
 
  • #15
rabbed said:
Okay

Yeah, maybe it got confusing with (dx, dy, dz), but it does have with delta to do.
But just to be clear, with (dr, da, do) you still mean a unit vector, right?
It's a good idea to use a unit vector to visualize it, but that is not necessary. It should convert any velocity vector in the (r,a,o) coordinate system to the (x,y,z) coordinate system.
 
  • #16
FactChecker said:
It's a good idea to use a unit vector to visualize it, but that is not necessary. It should convert any velocity vector in the (r,a,o) coordinate system to the (x,y,z) coordinate system.
Okay

But for the directional derivative to get the correct amount of slope in the direction of (vx,vy,vz) it would need to have a length of one?
Did you agree with my description above, about a coordinate system C placed inside the destination space?
In that case, my next question is how to get the direction of maximum slope in the point
 
Back
Top