1
$\begingroup$

I'm trying to create an equal area projection from a sphere. The sphere might not necessarily be the Earth. I would like, for instance, to use the Sun. Using the code

GeoGraphics[
  GeoRange -> All, 
  GeoModel -> Entity["Star", "Sun"], 
  GeoProjection -> "Orthographic"]  

doesn't work. This must have something to do with the data that Mathematica has for the Sun.

So, I decided that I need to create my own sphere like so:

 SphericalPlot3D[1, {u, 0, Pi}, {v, 0, 2 Pi}, 
   PlotPoints -> 50, 
   TextureCoordinateFunction -> ({#5, 1 - #4} &), 
   PlotStyle -> Directive[Texture[Import["https://i.stack.imgur.com/YOzSq.jpg"]]]]

Image of Sphere

Now, I want to use an equal area projection. Preferably, I would like to use GeoProjection and GeoProjectionData. But I am having trouble putting it into the correct format. I don't need to use GeoProjection, but it seems like a good option.

$\endgroup$
3
$\begingroup$

ImageTransformation[] is useful for this. I assume centering at $(\varphi,\lambda)=(0,0)$; for other centers, I'll leave the adjustment to you.

sun = Import["https://i.stack.imgur.com/YOzSq.jpg"];

ImageTransformation[sun, If[#[[1]]^2 + #[[2]]^2 < 1,
                            {Arg[Sqrt[1 - #[[1]]^2 - #[[2]]^2] + I #[[1]]], 
                             ArcSin[#[[2]]]}, {π, π}] &, 
                    DataRange -> {{-π, π}, {-π/2, π/2}}, Padding -> 1., 
                    PlotRange -> {{-1, 1}, {-1, 1}}]

orthographically-projected sun

$\endgroup$
  • $\begingroup$ (For comparison's sake, replace sun in the above code with your favorite equirectangular map of Earth, and compare with GeoGraphics[GeoRange -> All, GeoProjection -> "Orthographic"].) $\endgroup$ – J. M. will be back soon Jan 24 '17 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.