如何画圆形桌子

如何画圆形桌子

简短的问题:如何绘制这样的东西?

在此处输入图片描述

答案1

在此处输入图片描述

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw [very thick] (-4,0) -- (4,0);
\draw [very thick] (0,-4) -- (0,4);
\foreach [
  evaluate=\rad as \qb using int(\rad+4),
  evaluate=\rad as \qc using int(\rad+8),
  evaluate=\rad as \qd using int(\rad+12)
  ]
  \rad in {1,2,3,4} {
     \draw (0,0) circle[radius=\rad];
     \node at (45:\rad-0.5) {\rad};
     \node at (-45:\rad-0.5) {\qb};
     \node at (135:\rad-0.5) {\qd};
     \node at (-135:\rad-0.5) {\qc};
   }
\end{tikzpicture}
\end{document}

较短的版本,相同的输出

\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw [very thick] (-4,0) -- (4,0)
                   (0,-4) -- (0,4);
\foreach \rad in {1,2,3,4} {
     \draw (0,0) circle[radius=\rad];
     \foreach [count=\i from 0,evaluate=\i as \y using int(\rad+\i*4)] \q in {45,315,225,135}
        \node at (\q:\rad-0.5) {\y};
   }
\end{tikzpicture}
\end{document}

答案2

PSTricks 旨在解决您的问题。

\documentclass[pstricks,preview,margin=5mm]{standalone}

\begin{document}
\begin{pspicture}(-4,-4)(4,4)
    \psline(-4,0)(4,0)\psline(0,-4)(0,4)
    \foreach \i in {0,1,2,3}{%
        \pscircle{!\i\space 1 add}
        \foreach \j in {0,1,2,3}{\rput(!\i\space .5 add \j\space -90 mul 45 add PtoC){\the\numexpr4*\j+\i+1\relax}}
    }
\end{pspicture}
\end{document}

在此处输入图片描述

相关内容