请教一个问题,如何用latex将下图变成一个正十二边形?

发布于 2024-11-08 10:32:19

请教一个问题,如何用latex将下图变成一个正十二边形?
$$xymatrix@R=0.5cm@C=0.7cm{
&&&overset{a_{1,1}}{bullet}&&&\
&&overset{a_{1,12}}{bullet}&&overset{a_{1,2}}{bullet}&&\
&overset{a_{1,11}}{bullet}&&&&overset{a_{1,3}}{bullet}&\
underset{a_{1,10}}{bullet}&&&&&&underset{a_{1,4}}{bullet}\
&underset{a_{1,9}}{bullet}&&&&underset{a_{1,5}}{bullet}&\
&&underset{a_{1,8}}{bullet}&&underset{a_{1,6}}{bullet}&&\
& & & overset{a_{1,7}}{bullet} & & &
ar"1,4";"2,3"_{alpha_{0,0}}
ar"2,3";"3,2"_{alpha_{0,1}}
ar"3,2";"4,1"_{alpha_{0, 2}}
ar"4,1";"5,2"_{alpha_{0,11}}
ar"5,2";"6,3"_{alpha_{0,10}}
ar"6,3";"7,4"_{alpha_{0,3}}
ar"7,4";"6,5"_{alpha_{0,9}}
ar"6,5";"5,6"_{alpha_{0,4}}
ar"5,6";"4,7"_{alpha_{0,8}}
ar"4,7";"3,6"_{alpha_{0,5}}
ar"3,6";"2,5"_{alpha_{0,7}}
ar"2,5";"1,4"_{alpha_{0, 6}}
}$$

361d389643e50e0cd52426bab9983d1.jpg

查看更多

关注者
0
被浏览
198
Sagittarius Rover
Sagittarius Rover 2024-11-08
我要成为TikZ糕手/(ㄒoㄒ)/~~

TikZ的技巧性实在是太强了,我还有很长的路要走(落泪)

非常感谢外国网友的帮助,但我微调了一下,感觉下面的代码还是有些"不优雅"的问题(哎)

另外,请你查看围栏代码块语法,学会讲代码放到代码块里,以便他们正确的高亮。 (Un)Happy TikZing!

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}[rotate=120,]% rotate=120
    \foreach \i [
      count=\j from -1, % trick to start from -1
      evaluate=\i as \invi using int(11-\i),
      evaluate=\j as \invj using int(11-\j),
    ] in {0,...,11} {
        \node[
          fill, circle, 
          inner sep=1pt, outer sep=3pt,
          label={
            [inner sep=0pt, minimum width=.5em,] % <angle:label-text>
            {360/12*(\i-1/2)+120}:{\footnotesize $a_{1,\invi}$}
          }
        ] (a\i) at ({360/12*(\i-1/2)}:2.5) {};
        \ifnum\i=0\else
            \draw[<-] (a\i) -- node[inner sep=0pt, circle, label={
                [circle, inner sep=0pt]{360/12*(\i-1)+120}:{\footnotesize$\alpha_{1,\invj}$}
            }] {} (a\j);
        \fi
    }
    \draw[<-] (a0) -- node[
      inner sep=0pt, circle,
      label={
        [circle, inner sep=0pt, swap]
        {-360/12+120}:{\footnotesize$\alpha_{1,0}$}
    }] {} (a11);
    \end{tikzpicture}
\end{document}

image.png

1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览