-1
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\shade[ball color = gray!40, opacity = 0.4] (0,0) circle (2cm);
\draw (0,0) circle (2cm);
\draw (-2,0) arc (180:360:2 and 0.6);
\draw[dashed] (2,0) arc (0:180:2 and 0.6);
\fill[fill=black] (0,0) circle (1pt);
\draw[dashed] (0,0 ) -- node[above]{$r$} (2,0);
\end{tikzpicture}
\end{document}
2
  • 2
    You did it! -so what is your question? Sep 16 at 6:47
  • 1
    Just replace color in \shade[ball color = gray!40, opacity = 0.4] with whatever you want. For example, \shade[ball color = blue!40, opacity = 0.4].
    – ihsingh2
    Sep 16 at 7:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.