MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: World map as Texture


Hi,
This piece of code will (sort of) do it:

img= Import["path to your image.png"];

SphericalPlot3D[1, {=CE=B8, 0, Pi}, {\[Phi], 0, 2 Pi},
 PlotStyle -> Directive[Specularity[White, 30], Texture[img]],
 TextureCoordinateScaling -> True,
 TextureCoordinateFunction -> ({#4, #5} &), Lighting -> "Neutral",
 Mesh -> None, PlotRange -> All]

You can find several free maps in different kinds of projections here:
http://en.wikipedia.org/wiki/Map_projection

The above code has a problem with the TextureCoordinateFunction, ie you need to know the type of projection and then supply the right arguments ({#4, #5} &) otherwise it will look distorted.

Perhaps someone else has a better solution, as I'm quite interested in this myself as well :)

Cheers



  • Prev by Date: Re: Legends for Data Plots: an addition to the previous post
  • Next by Date: Mathematica + ZEMAX
  • Previous by thread: Re: World map as Texture
  • Next by thread: Re: World map as Texture