我需要为小孩子做数学练习,我想放一些图画,但不粘贴图像。我有一些球体,但它们很丑。如何制作一个球体?
我写了这个:
\begin{tikzpicture}
\shade[shading=ball, ball color=yellow, opacity=1] (0,0) circle (1);
\end{tikzpicture}
答案1
没有尝试正确的几何形状(英国的学究们无疑已经签署了这份请愿书),但如果你可以接受更“图标风格”的足球……
\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}
...还有一个篮球...
\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}
...一个网球...
\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}
答案2
答案3
作为@CarLaTeX 已经评论过tikzducks 包含一个足球,但是你也可以使用没有鸭子的足球的实现:
\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}