Article

Tests

BeginPackage["Wikicode`Earth`"]

Model::usage = "Model[texture] returns a GraphicsComplex for a given \
simple, textured model of the Earth. Texture is a string that changes \
the appearance of the returned model. The available textures are \
\"January\", \"July\", \"Clouds\", and \"Night\"."

Begin["`Private`"]

Model[texture_] := 
 Module[{imageUrls = {"January" -> 
      "http://eoimages.gsfc.nasa.gov/images/imagerecords/73000/73938/\
world.200401.3x5400x2700.jpg", 
     "July" -> 
      "http://eoimages.gsfc.nasa.gov/images/imagerecords/74000/74092/\
world.200407.3x5400x2700.jpg", 
     "Clouds" -> 
      "http://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57735/\
land_ocean_ice_cloud_2048.jpg", 
     "Night" -> 
      "http://eoimages2.gsfc.nasa.gov/images/imagerecords/79000/79765/\
dnb_land_ocean_ice.2012.3600x1800.jpg"}}, 
  First@RevolutionPlot3D[{Sin@t, Cos@t}, {t, 0, Pi}, 
    PlotStyle -> {Specularity[White, 10], 
      Texture@Import[texture /. imageUrls]}, 
    TextureCoordinateFunction -> ({#5, 1 - #4} &), Mesh -> None, 
    PlotPoints -> 50]]

Model[] := Model["Clouds"]

End[]
EndPackage[]