0

I need to do math exercises for young children and I would like to put some drawings but without pasting images. I have some spheres but they are ugly. How would a ball be made?

I wrote this:

\begin{tikzpicture}
\shade[shading=ball, ball color=yellow, opacity=1] (0,0) circle (1);
\end{tikzpicture}
Marina
  • 323
  • Maybe this will help you https://tex.stackexchange.com/questions/268364/kind-of-photorealistic-radial-shading-in-tikz – sergiokapone Feb 02 '18 at 07:39
  • Look also here: https://tex.stackexchange.com/a/387126/101651! I think young children will be happy with soccer ducks! See the tikzducks package: they are ready to use! – CarLaTeX Feb 02 '18 at 09:21

3 Answers3

13

No attempts at the correct geometry (pedants in the UK will no doubt have already signed this petition), but if you can live with a more "icon-style" soccer ball...

\documentclass[tikz,border=5]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}
\clip [preaction={fill=gray!15}] circle [radius=1];
\fill [black!75, shift=(0:0), scale=5/12]
  (90:1) \foreach \a in {1,...,4}{ -- (90+\a*72:1) } -- cycle;
\foreach \i in {0,...,4}
  \fill [black!75, shift=(90+\i*72:1), scale=1/3, rotate=\i*72+180]
    (90:1) \foreach \a in {1,...,4}{ -- (90+\a*72:13/12 and 1) } -- cycle;
\fill [black, opacity=0.125] (45:1) arc (45:-135:1) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

...and a basketball...

\documentclass[tikz,border=5]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}
\clip [preaction={fill=orange}] circle [radius=1];
\draw [black!75, ultra thick, line cap=round] (90:1) -- (270:1)
  (180:11/10) arc (180:0:11/10 and 1/2)
  (270:1) .. controls ++(180:3/2) and ++(  0:4/3) ..(135:1)
  (270:1) .. controls ++(0  :3/2) and ++(180:4/3) ..( 45:1);
\fill [black, opacity=0.125] (45:1) arc (45:-135:1) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

...a tennis ball...

\documentclass[tikz,border=5]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}
\clip [preaction={fill=green!25!yellow}] circle [radius=1];
\draw [rotate=45, white, line width=4pt, postaction={draw=gray!5, line width=2pt}, line cap=round] 
 (270:1) .. controls ++(180:3/2) and ++(  0:1) ..(135:1)
  (270:1) .. controls ++(0  :3/2) and ++(180:1) ..( 45:1);
\fill [black, opacity=0.125] (45:1) arc (45:-135:1) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Mark Wibrow
  • 70,437
  • Unfortunately I can’t sign the petition. A nice application of Euler’s formula for polyhedra is showing that you can’t cover a sphere by hexagons; one can also use it for counting the number of pentagons and hexagons in a soccer ball without having one at hand. – egreg Feb 02 '18 at 09:16
  • Wonderful. Your figure are similar at the real bodies of soccer, tennis e basket. +1. – Sebastiano Feb 02 '18 at 20:25
4

If soccer/football is enough, you can find one in fontawesome. This way you don't need TikZ.

\documentclass{article}
\usepackage{fontawesome}
\begin{document}
\Huge \faSoccerBallO
\end{document}

enter image description here

Ignasi
  • 136,588
1

As @CarLaTeX already commented the tikzducks contain a football, but you can also use the implementation of the football without the duck:

\documentclass{standalone}
\usepackage{tikzducks}

\begin{document}

\begin{tikzpicture}
    \duck[football]
\end{tikzpicture}   

\begin{tikzpicture}
    \fill[gray!30!white] (1.2,0.33) circle (0.32);
    \begin{scope}
        \clip (1.2,0.33) circle (0.32);
        \fill[black] (1.06,0.30) -- (1.01,0.17) -- (1.14,0.08) -- (1.26,0.14) -- (1.20,0.28) -- cycle (1.37,0.14) -- (1.46,0.27) -- (1.59,0.27) -- (1.41,0.04) -- cycle (1.28,0.38) -- (1.22,0.52) -- (1.33,0.61) -- (1.45,0.51) -- (1.43,0.37) -- cycle (0.87,0.44) -- (1.02,0.40) -- (1.10,0.53) -- (1.07,0.62) -- (0.94,0.57) -- cycle;
    \end{scope}
\end{tikzpicture}

\end{document}

enter image description here