大圆及其半径

大圆及其半径

我不知道如何画圆的半径。这是我能画的

\documentclass[tikz]{standalone} 
\usetikzlibrary{patterns} 
\newcommand{\greatcircle}[5][]{ \path[#1,pattern=north west lines,pattern color=#1!60,rotate=#5,dashed] 
           (#2) circle [x radius=#3, y radius=#4]; 
\begin{scope}[rotate=#5] 
\clip (#3,0) rectangle ([xshift=-0.1,yshift=-0.1]-#3,-#4); 
\draw[#1] (#2) circle [x radius=#3, y radius=#4]; 
\end{scope} 
} 
\begin{document} 
\begin{tikzpicture} 
\draw[](0,0) circle [radius=2cm];  
\end{tikzpicture} 
\end{document}

这就是我想要的……

在此处输入图片描述

答案1

\documentclass[tikz]{standalone} 
\begin{document}

\begin{tikzpicture} 
\draw (0,0) circle [radius=2cm];
\foreach \i [count=\j] in {18,36,...,360}
  \draw (0,0)--(\i:2cm) node[shift=(\i:1em)]{\small\j}; 
\end{tikzpicture} 

\end{document}

在此处输入图片描述

答案2

我还是 TiZ 初学者,所以我的尝试相当笨拙(但有效 ;-))

在此处输入图片描述

\documentclass[tikz]{standalone} 
\usetikzlibrary{patterns,calc} 
\newcommand{\greatcircle}[5][]{ \path[#1,pattern=north west lines,pattern color=#1!60,rotate=#5,dashed] 
  (#2) circle [x radius=#3, y radius=#4]; 
  \begin{scope}[rotate=#5] 
    \clip (#3,0) rectangle ([xshift=-0.1,yshift=-0.1]-#3,-#4); 
    \draw[#1] (#2) circle [x radius=#3, y radius=#4]; 
  \end{scope} 
} 
\begin{document} 
\begin{tikzpicture} 
\draw[](0,0) circle [radius=2cm];  
\node (center) at (0,0) {};
\foreach \x in {0,20,...,360} {
  \pgfmathcos{\x}
  \edef\costemp{\pgfmathresult}
  \pgfmathsin{\x}
  \edef\sintemp{\pgfmathresult}
  \draw (0,0) -- (2*\costemp,2*\sintemp);
}
\foreach \x in {0,1,...,17} {
  \edef\currentangle{\pgfmathresult}
  \pgfmathcos{\x*20}
  \edef\costemp{\pgfmathresult}
  \pgfmathsin{\x*20}
  \edef\sintemp{\pgfmathresult}
  \node (A\x) at (2.2*\costemp,2.2*\sintemp) {\x};
}


\end{tikzpicture} 
\end{document}

相关内容