- #1
rabbed
- 243
- 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?
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: