TKiZ(3)

Koda

*** QuickLaTeX cannot compile formula:
\begin{tikzpicture}[]
\foreach \z in {8,6,4,2}
{
\foreach \x in {1,3,5,7}
\foreach \y in {1,3,5,7}
\shade[shading=ball, ball color=gray](\x+2+0.8*\z,\y+2+0.5*\z) circle(0.6cm);
\foreach \x in {2,4,6,8,10}
\foreach \y in {2,4,6,8,10}
\shade[shading=ball, ball color=red](\x+0.8*\z,\y+0.5*\z) circle(1cm);
}
\end{tikzpicture}

*** Error message:
Environment tikzpicture undefined.
leading text: \begin{tikzpicture}

nam da

Vprašanje: Če je polmer rdeče kroglice R in se siva kroglica dotika 4 rdečih kroglic, kolikšen je polmer sive kroglice?