以下是我目前所掌握的信息:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill[ball color=blue!20] (0,0) circle (1.5 cm);
\newcommand\longitude[1]{%
\draw (#1:1.5) arc (0:-180:{1.5*cos(#1)} and {0.2*cos(#1)});
\draw[dashed] (#1:1.5) arc (0:180:{1.5*cos(#1)} and {0.2*cos(#1)});
}
\longitude{30};
\longitude{0};
\longitude{-30};
\end{tikzpicture}
\end{document}
但是这会绘制纬线而不是经线。我的目标是让图表看起来像这样:
答案1
TeXample.net可以是一个很好的资源。以下是改编自蒲公英球例子。
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\tikzset{
MyPerspective/.style={scale=1.8,x={(-1cm,0cm)},y={(1cm,0cm)},
z={(0cm,1.2cm)}}
}
\begin{document}
\begin{tikzpicture}[MyPerspective]
\foreach \t in {0,15,...,165}% meridians
{\draw[gray] ({cos(\t)},{sin(\t)},0)
\foreach \rho in {5,10,...,360}
{--({cos(\t)*cos(\rho)},{sin(\t)*cos(\rho)},
{sin(\rho)})};
}
\end{tikzpicture}
\end{document}