如何在Mathematica中正确显示自定义3D图形? [英] How do you get custom 3D graphics to display properly in Mathematica?
问题描述
我需要将地球的3D模型合并到我在Mathematica中创建的卫星轨道截取模拟中(我需要它与Graphics3D []一起工作)。我已经下载了Mathematica声称支持的几种不同模型我甚至在Pro / E中创建了自己的文件,那些实际上被导入到程序中的文件(使用Import [])会丢失它们的表面图像,并且我剩下一个通用球体。正确导入到Mathematica中?某些格式是否比其他格式更好?(我一直使用的主要是CAD模型)是否有地方为Mathematica下载更多(用户创建的)3D图形?
我知道这是可能的,因为Belisarius在回答这个问题时已经这样做了:
在应用程序,地球纹理
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.
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
这篇关于如何在Mathematica中正确显示自定义3D图形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!