如何像我给圆形添加阴影一样给 Tikz 弧添加阴影

如何像我给圆形添加阴影一样给 Tikz 弧添加阴影

我希望这个arc阴影就像我对 所做的一样Circle

\documentclass[border=1cm]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}[font=\small]
    % Static part
        \draw[draw=white,fill=YellowOrange,thick] (-45:2.5) -- (-45:4) arc(-45:-90:4) -- (-90:2.5) arc(-90:-45:2.5) -- cycle ;
        \shade[shading=ball, ball color = gray!10] (1.5,-3.7) circle (0.2cm);{\tiny (3.8,-1.4) circle (0.2cm);}
        \shade[shading=ball, ball color = YellowOrange] (1.5,-3.7) circle (0.1cm);
    \end{tikzpicture}
\end{document}

这是其输出

答案1

不是自作聪明,而是你想让圆弧像圆一样有阴影。如下:

阴影弧

\documentclass[border=1cm]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}[font=\small]
    % Static part
        \draw[draw=white,shading=ball, ball color = YellowOrange,thick] (-45:2.5) -- (-45:4) arc(-45:-90:4) -- (-90:2.5) arc(-90:-45:2.5) -- cycle ;
        \shade[shading=ball, ball color = gray!10] (1.5,-3.7) circle (0.2cm);{\tiny (3.8,-1.4) circle (0.2cm);}
        \shade[shading=ball, ball color = YellowOrange] (1.5,-3.7) circle (0.1cm);
    \end{tikzpicture}
\end{document}

相关内容