aa=CountryData[#,"SchematicPolygon"][[1,1]]&/@CountryData[];
GeoPositionXYZ[#][[1]]/10^6&/@Map[GeoPosition[Reverse[#]]&,aa[[1]]];
mylength=Max[Sqrt[#.#]&/@(GeoPositionXYZ[#][[1]]/10^6&/@
Map[GeoPosition[Reverse[#]]&,aa[[1]]])];
myearth=Graphics3D[Table[Polygon[GeoPositionXYZ[#][[1]]/10^6&/@
Map[GeoPosition[Reverse[#]]&,aa[[i]]]],{i,Length[aa]}],
Boxed->False,Axes->False,SphericalRegion->True,
RotationAction->"Fit"];
temp=SphericalPlot3D[mylength,{\[Theta],0,Pi},{\[Phi],0,2Pi},
Boxed->False,Axes->False,SphericalRegion->True,
RotationAction->"Fit",
MeshShading->{{FaceForm[None,None],
FaceForm[None,None]},{FaceForm[None,None],
FaceForm[None,None]}}];
earth=Show[myearth,temp];
Export["earth.gif",Graphics3D[Rotate[earth[[1]],2Pi*#/100,{0,0,1}],
Boxed->False,Axes->False,SphericalRegion->True,
RotationAction->"Fit"]&/@Range[0,100,1]]
Mathematica 教學 Draw a 3D Globe via Mathematica
由 戴忠淵 於 2011年5月5日星期四
下午6:14 發表
讀者回應 ( 0 意見 )
訂閱發佈留言 (Atom)
發佈留言
Please leave your name and tell me what you thought about this site. Comments, suggestions and views are welcomed.
如果這篇文章對你有幫助,那請留個訊息給我~