12

I want to have a stripped ball with 3-D shading. My attempt

\documentclass{scrartcl}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
        \shade[shading=ball, ball color=green!60] (0,2) arc (90:-90:2) arc (-90:90:1.2 and 2);
        \shade[shading=ball, ball color=red!60] (0,2) arc (90:-90:-2 and 2) arc (-90:90:-1 and 2);
        \shade[shading=ball, ball color=blue!60] (0,2) arc (90:-90:-1 and 2) arc (-90:90:1.2 and 2);
\end{tikzpicture}
\end{document}

obviously has a big flaw:

enter image description here

I would need to make the position of the light spot the same for all three segments. How can I achieve that?

1 Answer 1

25
\documentclass[tikz, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}
\shade[ball color=green!60] (0,0) circle[radius=2];
\clip (0,2) arc[start angle=90, end angle=-90, x radius=-2, y radius=2] arc[start angle=-90, end angle=90, x radius=1.2, y radius=2];
\shade[ball color=red!60] (0,0) circle[radius=2];
\clip (0,2) arc[start angle=90, end angle=-90, x radius=-1, y radius=2] arc[start angle=-90, end angle=90, x radius=1.2, y radius=2];
\shade[ball color=blue!60] (0,0) circle[radius=2];
\end{tikzpicture}
\end{document}

Tricolored ball

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .