# Curving points to a sphere

I think math.stackexchange is the right place to post this, but if not, feel free to tell me.

I have a series of points to be plotted on a sphere (Each one has a latitude and longitude value). These points are not actually spherical, but are differences from a perfect sphere at the lat/longitude. I'm trying to find out how to convert them into the absolute density.

For example, I have a sphere with a radius of 10. At latitude 10, longitude 5, the point should b extruded outward 1 unit ('Away' / on the radius). However, I do not know how to get the x,y,z coordinates (Cartesian) for the actual location of that point. In other wards, how do you map a height map to a sphere and get the exact locations of points?

Thanks!

• I believe you are looking for the formulas to convert spherical coordinates to rectangular coordinates. Jan 24, 2014 at 5:19
• @Jim Rephrasing: I'm trying to apply a height map to a sphere Jan 24, 2014 at 5:23
• @JimBelk Got cut off :( Rephrasing: I'm trying to apply a height map to a sphere link and have a latitude and longitude along with the amount to move (parallel to the radius) but am unsure of how to get the final location. If I simply create a smaller sphere (subtract the deformation), won't it need a different latitude and longitude to get the same point? Jan 24, 2014 at 5:29

Just look at the point $(\rho,\theta,\varphi)$ in spherical coordinates. You could locate the point you need using $\theta$ and $\varphi$ then the height variation can be done by increasing/decreasing $\rho$ by the height difference from the sphere it would normally sit on.
• It depends on your convention for $\theta$ and $\varphi$ which is latitude and longitude. However, the height difference only needs to vary how far the object is from the center of the sphere you are at, that's $\rho$. Think of it as the Earth. You use $\theta,\varphi$ to determine your location (like your city) and $\rho$ says how far you are from the ground (underground, in the sky, maybe on the ground, etc). Jan 24, 2014 at 7:16