由网友(沿海奔跑的少年。)分享简介:考虑以下内容:lalist = {{{{1, 1}, 1}, {{3, 3}, 1}, {{5, 5}, 1}},{{{1, 5}, 1}, {{3, 3}, 1}, {{5, 1}, 1}}}Row[{Graphics[{Opacity[0.5],Red, Disk @@@ lalist[[1]]}, Frame...
考虑以下内容:
lalist = {{{{1, 1}, 1}, {{3, 3}, 1}, {{5, 5}, 1}},
{{{1, 5}, 1}, {{3, 3}, 1}, {{5, 1}, 1}}}
Row[{
Graphics[{
Opacity[0.5],Red,
Disk @@@ lalist[[1]]},
Frame -> True],
Graphics[{
Opacity[0.5],Blue,
Disk @@@ lalist[[2]]},
Frame -> True]}
]
难道我绘制蓝军 磁盘背后的红色的在三维 情节? Is it possible that I plot the Blues Disks "behind" the red ones in a 3 D plot ?
下面是不是我所需要的:
Below is not what I need :
推荐答案
喜欢这个?
Graphics3D[{{Texture[
Graphics[{Opacity[0.5], Blue, Disk @@@ lalist[[2]]},
Frame -> True]],
Polygon[{{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}},
VertexTextureCoordinates [Rule] {{0, 0}, {1, 0}, {1, 1}, {0,
1}}]}, {Texture[
Graphics[{Opacity[0.5], Red, Disk @@@ lalist[[1]]},
Frame -> True]],
Polygon[{{-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1}},
VertexTextureCoordinates [Rule] {{0, 0}, {1, 0}, {1, 1}, {0,
1}}]}}, Lighting [Rule] "Neutral"]
很多人不透明度0.2:
Lots of them with opacity .2:
tab = Table[{Opacity [Rule] .2,
Texture[Graphics[{Opacity[0.5], Blue, Disk @@@ lalist[[2]]},
Frame -> True]],
Polygon[{{-1, -1, z}, {1, -1, z}, {1, 1, z}, {-1, 1, z}},
VertexTextureCoordinates [Rule] {{0, 0}, {1, 0}, {1, 1}, {0,
1}}]}, {z, -2, 2, 1}];
plt = Graphics3D[{tab}, Lighting [Rule] "Neutral"]
和400似乎并没有太大的问题,在速度方面(你可以很容易地修改上面的code才能看到它)。
and 400 don't seem to be much of a problem in terms of speed (you can easily modify the code above to see it).
编辑:好的,我傻了,试试这个
OK, just to be silly, try this
Dynamic[Graphics3D[{{Texture[#],
Polygon[{{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1}},
VertexTextureCoordinates [Rule] {{0, 0}, {1, 0}, {1, 1}, {0,
1}}]}, {Texture[Rotate[#, [Pi]/2]],
Polygon[{{-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1}},
VertexTextureCoordinates [Rule] {{0, 0}, {1, 0}, {1, 1}, {0,
1}}]}}, Lighting [Rule] "Neutral"] &@Binarize[CurrentImage[]]]
这使得
(或类似的东西),旋转,实时更新等。
(or something like that), rotatable, updated in real time etc.
相关推荐
最新文章