Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get custom 3D graphics to display properly in Mathematica?

I need to incorporate a 3D model of the Earth into a satellite orbit intercept simulation I have created in Mathematica (I need it to work with "Graphics3D[]). I have downloaded several different models in formats that Mathematica claims to support and I even created my own in Pro/E. The ones that actually do get imported into the program (using "Import[]") lose their surface image and I am left with a generic sphere. How can I get custom 3D graphics to import correctly into Mathematica? Are certain formats better than others? (I have been using mostly CAD models) And is there place to download more (user-created) 3D graphics for Mathematica?

I know it's possible because Belisarius has done so in a response to a question here: How to create 2D (3D) animation in Wolfram Mathematica with the camera following the object? which is almost exactly what I need to do, as far as views go.

like image 754
Pat Avatar asked Apr 09 '11 06:04

Pat


1 Answers

enter image description here

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}]

enter image description here

Edit

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

like image 111
Dr. belisarius Avatar answered Oct 13 '22 05:10

Dr. belisarius