大佬们,想问一下如何把二维的图插到三维图里面
mathematica吧
全部回复
仅看楼主
level 2
姹紫灬 楼主
二维:
ListVectorPlot[Table[{y, -x}, {x, 0, 1, 0.2}, {y, 0, 1, 0.2}],Frame->False]
三维:
Show[
Graphics3D[{Thick,
Arrow[{{0,0,0},{1.12,0,0}}],Text[Style["x",18,Bold],{1.1,-0.1,0}],
Arrow[{{0,0,0},{0,1.25,0}}],Text[Style["y",18,Bold],{-0.1,1.25,0}],
Arrow[{{0,0,0},{0,0,0.73}}],Text[Style["q",18,Bold],{-0.05,0,0.65}]}],
Graphics3D[{Arrow[{{0.6,0.35,0},{0.6,0.35,0.25}}],Arrow[{{0.6,0.35,0},{0.6,0.35,0.3}}],Arrow[{{0.6,0.35,0},{0.6,0.35,0.35}}],Line[{{0.6,0.35,0},{0.6,0.35,0.6}}]}],
Graphics3D[{Arrow[{{0.2,0.65,0.6},{0.2,0.65,0.3}}],Arrow[{{0.2,0.65,0.6},{0.2,0.65,0.25}}],A
rrow[{{0.2,0.65,0.6},{0.2,0.65,0.2}}],Line[{{0.2,0.65,0.6},{0.2,0.65,0}}]}],
Graphics3D[{RGBColor[1,1,0],Opacity[0.5],Polygon[{{0,0,0},{0,1,0},{1,1,0},{1,0,0}}]}],
Graphics3D[{RGBColor[0,1,0],Opacity[0.5],Polygon[{{0,0,0.6},{0,1,0.6},{1,1,0.6},{1,0,0.6}}]}],
Graphics3D[{RGBColor[0,1,1],Opacity[0.5],Polygon[{{0,0,0},{0,0,0.6},{0.8,1,0.6},{0.8,1,0}}]}],
Graphics3D[{PointSize[0.02],Point[{0.2,0.65,0}],Point[{0.6,0.35,0}],Point[{0.2,0.65,0.6}],Point[{0.6,0.35,0.6}]}],
Graphics3D[{Text[Style["Subscript[M, 0]={q=0}",14,Bold],{1.16,0.6,0}],Text[Style["Subscript[M, 1]={q=1}",14,Bold],{1.16,0.6,0.6}],Text[Style["Subscript[M, sw]={Subscript[K, 1]x=Subscript[K, 2]y}",14,Bold],{1.1,1,0.25}],Text[Style["a",18,Bold],{0.25,0.65,0}],,Text[Style["a",18,Bold],{0.65,0.35,0.6}],Text[Style["r",18,Bold],{0.65,0.35,0}],Text[Style["r",18,Bold],{0.25,0.65,0.6}]}],
Axes->False,Boxed->False]
比如想把第一张向量场的图水平放到第二张图里面,忽略掉边框那些
2023年01月15日 13点01分 1
level 5
可以尝试一下Inset函数插入插图
2023年01月27日 04点01分 2
level 5
忽略之前的inset方法,请使用Texture函数来实现,具体实现代码我就改动了一部分
Graphics3D[{Texture[p1], RGBColor[0, 1, 0], Opacity[0.5],
Polygon[{{0, 0, 0.6}, {0, 1, 0.6}, {1, 1, 0.6}, {1, 0, 0.6}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}]
这里p1是之前您给出的第一个向量图
可以绘制出这样的图:
2023年01月27日 06点01分 3
[真棒]
2023年01月29日 10点01分
[真棒]
2023年02月08日 02点02分
level 5
因为texture需要以一个graphics物体作为底,根据VertexTextureCoordinates 来确定贴图的方向,之后图片以贴图的方式进行结合展示,这种方式可以使二维图片和三维物体捆绑并且一起旋转观察。
2023年01月27日 06点01分 4
吧务
level 15
你看看SliceVectorPlot3D和ListSliceVectorPlot3D的帮助。
2023年02月04日 04点02分 5
懂了,主要是不知道可以用哪些函数而不是不会用[泪]
2023年02月08日 01点02分
[真棒]
2023年02月08日 02点02分
level 9
虽然但是,我一般都导出为obj在maya里面操作[哈哈]
2023年02月11日 01点02分 6
1