我问了一个问题这里但 Tikz 似乎是一个更好的选择。我试图使用 Mathematica 绘制以下原子徽标,但我只能弄清楚如何绘制相交的椭圆,而不是像下面这样的漂亮徽标。你知道如何使用 Tikz 绘制它吗?
答案1
尽管在这个平台上,人们在没有尝试自己解决问题的情况下寻求解决方案是会被反对的,但我还是借此机会学习如何使用pic
它,因为我以前从未真正使用过它。
所以,这当然不是真正的 3D,而且它也缺乏渐变,但也许你可以用它作为起点......
\documentclass[tikz]{standalone}
\tikzset{
ballsmall/.pic = {
\fill[draw=white, line width=2] (0,0) circle (.75);
},
balllarge/.pic = {
\fill[draw=white, line width=2] (0,0) circle (1.25);
},
ringfront/.pic = {
\clip (-7.5,0) rectangle (7.5,-2.75);
\fill[even odd rule, draw=white, line width=2] (0,0) ellipse (7.5 and 2.75) (0,.275) ellipse (6.5 and 2.25);
},
ringback/.pic = {
\clip (-7.5,0) rectangle (7.5,2.75);
\fill[even odd rule, draw=white, line width=2] (0,0) ellipse (7.5 and 2.75) (0,.275) ellipse (6.5 and 2.25);
}
}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={transform shape}]
\path[fill=red, rotate=90] (0,0) pic {ringback};
\path[fill=cyan, rotate=330] (0,0) pic {ringback};
\path[fill=green, rotate=210] (0,0) pic {ringback};
\path[fill=red, rotate=90] (0,0) pic {ringfront};
\path[fill=cyan, rotate=330] (0,0) pic {ringfront};
\path[fill=green, rotate=210] (0,0) pic {ringfront};
\end{scope}
\path[fill=red] (285:5.5) pic {ballsmall};
\path[fill=cyan] (165:5.5) pic {ballsmall};
\path[fill=green] (45:5.5) pic {ballsmall};
\path[fill=gray] (0,0) pic {balllarge};
\end{tikzpicture}
\end{document}
结果: