Re: World map as Texture
- To: mathgroup at smc.vnet.net
- Subject: [mg129964] Re: World map as Texture
- From: psycho_dad <s.nesseris at gmail.com>
- Date: Thu, 28 Feb 2013 21:25:02 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <kgmn9m$8hu$1@smc.vnet.net>
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