【问题标题】:cylinder node with opacity具有不透明度的圆柱节点
【发布时间】:2021-10-17 15:38:00
【问题描述】:

我正在创建一个具有多个具有不透明度和方向的圆柱体的节点。我希望图像看起来类似于图像中所示:

具体来说,我需要像靶心一样管理圆形方向,以便将文本放置在圆形中。 任何建议如何创建像这样“非常相似”的图像。

我的最小代码示例

%===============

\documentclass[tikz,border=2pt]{standalone}

\usetikzlibrary{shapes.geometric}

\begin{document}

\begin{tikzpicture}
  \node (n1) [cylinder, shape border rotate=180, draw, minimum height=20mm, minimum width=8.5mm,fill=blue!20,opacity=.5,rotate=18] {};

  \node (n2) [cylinder, shape border rotate=180, draw, minimum height=18mm, minimum width=6.5mm,fill=blue!30,opacity=.5,rotate=18] {};

  \node (n3) [cylinder, shape border rotate=180, draw, minimum height=16mm, minimum width=4.5mm,fill=purple!30,opacity=.5,rotate=18] {};

\end{tikzpicture}

\end{document}

%===============

【问题讨论】:

    标签: latex opacity tikz


    【解决方案1】:

    使用xshift,您可以将圆柱体移动到一个公共平面。此外,您可以使用aspect 键更接近您的图像。

    \documentclass[tikz,border=2pt]{standalone}
    
    \usetikzlibrary{shapes.geometric}
    
    \begin{document}
    
    \begin{tikzpicture}
      \node (n1) [cylinder, shape border rotate=150, draw, minimum height=20mm, minimum width=8.5mm,fill=blue!20,opacity=.5,rotate=18] {};
    
      \node (n2) [cylinder, shape border rotate=180, draw, minimum height=18mm, minimum width=6.5mm,fill=blue!30,opacity=.5,rotate=18,xshift=-0.95mm,aspect=0.75] {};
    
      \node (n3) [cylinder, shape border rotate=180, draw, minimum height=16mm, minimum width=4.5mm,fill=purple!30,opacity=.5,rotate=18,xshift=-1.9mm,aspect=0.5] {};
    
    \end{tikzpicture}
    
    \end{document}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-05
      • 1970-01-01
      • 2015-06-26
      • 2012-08-28
      • 1970-01-01
      • 1970-01-01
      • 2014-07-28
      相关资源
      最近更新 更多