cartesian to spherical plotting problem [message #64338] |
Fri, 19 December 2008 10:57 |
workmanj1
Messages: 5 Registered: December 2008
|
Junior Member |
|
|
So, I am having trouble figuring out how to properly map cartesian
data onto a spherical surface. Here is the jist of what I am trying
to do.
Imagine that I have a spherical ball of uniform density and radius R
centered about (0,0,0). At every point on the ball I have a position
vector defined by (x,y,z) and a value rho (constant at all points for
simplicity). For each point I calculate a normalized position vector
from which I can determine the theta (latitude) and phi (longitude) of
the vector, r is unity so the space spans the surface of a sphere. I
then want to generate a lon/lat 2d array which maps out the entire
surface and put ALL of the rho with a given lon,lat onto that surface
of the sphere.
For example, if n points span the distance from (0,0,0) to (R,0,0) and
I have a corresponding lon,lat of (pi/2,pi/2) then I want that point
on my 2d array to be n*rho.
Simply binning the value leaves me with geometrical issues as well as
undersampling of points at certain lon,lat coordinates due to the
geometry transform. I believe that dividing by sin(lat) at each
points properly normalizes the areas but I am not sure. I'd also like
to be able to interpolate the values at the undersampled regions.
Ultimately I need to feed this to a mollweide projection which I know
how to do.
So far all of IDLs routines seem to throw away redundant data which is
the opposite of what I want. I think adaptive kernel smoothing might
work but am unfamiliar with how to use it. Does anyone have any
suggestions?
My final use will to be to bin total mass by a coordinate sphere
determined by unit angular momentum but the procedure is equivalent to
what I have outlined above and I know that the result of what I
outlined above should be an array and map of equal value at all
points.
Thanks in advance.
|
|
|