The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: World map as Texture
Replies: 2   Last Post: Mar 2, 2013 2:34 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 66
Registered: 4/28/07
Re: World map as Texture
Posted: Mar 2, 2013 2:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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:

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 :)


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.