Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13643 > unrolled thread
| Started by | Sergio Miguel Terrazas Porras <sterraza@uacj.mx> |
|---|---|
| First post | 2013-02-28 04:43 +0000 |
| Last post | 2013-03-02 07:34 +0000 |
| Articles | 4 — 4 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
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
| From | Sergio Miguel Terrazas Porras <sterraza@uacj.mx> |
|---|---|
| Date | 2013-02-28 04:43 +0000 |
| Subject | World map as Texture |
| Message-ID | <kgmn9m$8hu$1@smc.vnet.net> |
Hello folks! How can I get, within Mathematica a map of the world and use it as Texture on a sphere. Do the images to be used as texture need to be in a special format? Thank you. Sergio Terrazas
[toc] | [next] | [standalone]
| From | minxari@gmail.com |
|---|---|
| Date | 2013-03-01 02:24 +0000 |
| Message-ID | <kgp3gi$csd$1@smc.vnet.net> |
| In reply to | #13643 |
See at Mathematica help/Texture/Applications/Earth texture map. In help/Texture you will find all the kind species.
[toc] | [prev] | [next] | [standalone]
| From | psycho_dad <s.nesseris@gmail.com> |
|---|---|
| Date | 2013-03-02 07:34 +0000 |
| Message-ID | <kgsa1v$in8$1@smc.vnet.net> |
| In reply to | #13643 |
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
[toc] | [prev] | [next] | [standalone]
| From | Szabolcs Horvát <szhorvat@gmail.com> |
|---|---|
| Date | 2013-03-02 07:34 +0000 |
| Message-ID | <kgsa2q$ini$1@smc.vnet.net> |
| In reply to | #13643 |
On 2013-02-28 04:43:34 +0000, Sergio Miguel Terrazas Porras said: > Hello folks! > > How can I get, within Mathematica a map of the world and use it as > Texture on a sphere. > Do the images to be used as texture need to be in a special format? Please see here: http://mathematica.stackexchange.com/questions/3646/how-to-make-a-3d-globe and here: http://mathematica.stackexchange.com/questions/52/texture-mapping-and-resizing-a-sphere-primitive-in-mathematica
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web