且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Mathematica中正确显示自定义3D图形?

更新时间:2022-10-16 16:31:58

myEarth = 
 ParametricPlot3D[{Cos@u Sin@v, Sin@u Sin@v, Cos@v}, {u, 0, 2 Pi}, {v, 0, Pi}, 
   Mesh -> None, TextureCoordinateFunction -> ({#4, 1 - #5} &), 
   PlotStyle -> Texture[Show[map, ImageSize -> 1000]]];  

a = {-1, 1};
Animate[
 Show[
  Graphics3D[Sphere[{0, 0, 0}, .5], 
   ViewPoint -> 3.5 {Cos@t, Sin@t, 0}, SphericalRegion -> True, 
   PlotRange -> {a, a, a}, Axes -> False, Boxed -> False],
   myEarth], 
{t, 0, 2 Pi}]

Edit

I found from where I borrowed some code: http://reference.wolfram.com/mathematica/ref/Texture.html Under Applications, Earth Texture