在 Mathematica 中使用 Graphics3D 的线条样式 [英] Line Style using Graphics3D in Mathematica

查看:24
本文介绍了在 Mathematica 中使用 Graphics3D 的线条样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑以下几点:

cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0,0}, {1, 0, 0}}};

Graphics3D[{Line /@ cAxes}, Boxed -> False]

如何对 3 行进行不同的样式设置?

How can Style differently the 3 lines ?

推荐答案

上面的答案很好,但我想展示一些替代方案.

The answer above are good, but I want to show some alternatives.

我表明可以为此使用 Style,并且 TubeLine 的有趣替代方案.

I show that it is possible to use Style for this, and that Tube is an interesting alternative to Line.

cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0, 
     0}, {1, 0, 0}}};

tubes = Tube@# ~Style~ #2 & ~MapThread~ {cAxes, {Red, Green, Blue}};

Graphics3D[tubes, Boxed -> False]

这篇关于在 Mathematica 中使用 Graphics3D 的线条样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆