Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I want to paste an image on the surface of a 3D plot. For example consider this image which I want to paste on the surface of this sphere

ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Mesh -> 1]

What will be the best way to do that?

EDIT and Clarification

My main objective is not to make a globe but to find a general way to use any arbitrary image on a surface. I choose the map and sphere just as an example (a popular one). Texture is a good option, but I find some difficulty to use it with ContourPlot3D or Plot3D. To make my point clear, I would request to show me an example with this image and the following surface,

Plot3D[Abs[x y], {x, -1, 1}, {y, -1, 1}]
share|improve this question

marked as duplicate by Sjoerd C. de Vries, Silvia, Mark McClure, Jens, halirutan Jun 23 '13 at 23:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This should probably do it. – Mark McClure Jun 23 '13 at 21:17
Look up Texture in Mathematica's document center. There are several examples that do precisely this. – Sjoerd C. de Vries Jun 23 '13 at 21:27
Come on, just do exactly the same thing: Plot3D[Abs[x y], {x, -1, 1}, {y, -1, 1}, PlotStyle -> Texture[Import[""]], Lighting -> "Neutral"] – Rahul Jun 23 '13 at 22:52

This question is very similar to How to make a 3D globe. There is some difference, as that question dealt with building a globe from scratch, whereas this question has a predefined image. There is a little difference in that you'll need to manually trim the boundary of your image. Here's how did it:

pic = Import[""];
{width, height} = ImageDimensions[pic];
w = 40; h = 45;
pic = ImageTake[pic, {h, height - h}, {w, width - w}];
ParametricPlot3D[{Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]} ,
  {u, 0, 2 Pi}, {v, 0, Pi}, Mesh -> None, PlotPoints -> 100,
  TextureCoordinateFunction -> ({#4, 1 - #5} &), Boxed -> False,
  PlotStyle -> Texture[Show[pic, ImageSize -> 1000]],
  Lighting -> "Neutral", Axes -> False, RotationAction -> "Clip",
  ViewPoint -> {-2.026774, 2.07922, 1.73753418},
  ImageSize -> 600]

enter image description here

share|improve this answer
@smtg using Mark McClure's answer to fulfill your requirements in the Edit/Clarification: Plot3D[Abs[x y], {x, -1, 1}, {y, -1, 1}, TextureCoordinateFunction -> ({#1, 1 - #2} &), PlotStyle -> Texture[Show[pic, ImageSize -> 1000]], Lighting -> "Neutral", Mesh -> False] The only difference is in the TextureCoordinateFunction. – bobthechemist Jun 24 '13 at 12:53

You could use ContourPlot3D, but I'd use SphericalPlot3D instead. That's because you're plotting a spere anyways and SphericalPlot3D seems to be the better functionality on that matter.

I leave the rest of the options such as in your example for ContourPlot3D.

SphericalPlot3D[1, {u, 0, Pi}, {v, 0, 2 Pi}, PlotPoints -> 50, 
    MaxRecursion -> 0, Mesh -> True, 
    TextureCoordinateFunction -> ({#5, 1 - #4} &), 
    PlotStyle -> 
        Specularity[White, 50]], Lighting -> "Neutral"]

Personally I'd remove any mesh, axis and boxes, but this is just a matter of taste.

enter image description here

share|improve this answer

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