本文介绍了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.

我表明,它可以使用风格对于这一点,那是一个有趣的替代

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的线型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 07:41