Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13662

Re: World map as Texture

From psycho_dad <s.nesseris@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: World map as Texture
Date 2013-03-02 07:34 +0000
Message-ID <kgsa1v$in8$1@smc.vnet.net> (permalink)
References <kgmn9m$8hu$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

World map as Texture Sergio Miguel Terrazas Porras <sterraza@uacj.mx> - 2013-02-28 04:43 +0000
  Re: World map as Texture minxari@gmail.com - 2013-03-01 02:24 +0000
  Re: World map as Texture psycho_dad <s.nesseris@gmail.com> - 2013-03-02 07:34 +0000
  Re: World map as Texture Szabolcs Horvát <szhorvat@gmail.com> - 2013-03-02 07:34 +0000

csiph-web