Draw sphere with some portion is dotted

I have drawn the curve in another way below :

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0) circle (3cm);
\draw (-3,0) arc (180:360:3cm and 1cm);
\draw[dashed] (-3,0) arc (180:0:3cm and 1cm);

\end{tikzpicture}
\end{document}  

enter image description here


In your case, it is very simple to draw the ellipse twice, and clip the solid part, so only half of it is shown.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (2,2) circle (3cm);
\draw[dashed] (2,2) ellipse (3cm and 1cm);
\clip (-1.1,2) rectangle (5.1 cm,0.9 cm);
\draw (2,2) ellipse (3cm and 1cm);
\end{tikzpicture}
\end{document}

result

Tags:

Tikz Pgf