如何使用 LaTeX 画一个圆 [英] How to draw a circle by using LaTeX
本文介绍了如何使用 LaTeX 画一个圆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 Latex 中绘制一个有 6 个等距点的圆,标记为 1,...,6
然后连接点 1、点 2、点 3... 有谁知道如何画出来?谢谢!
I want to draw a circle with 6 equidistant points in Latex, labeled 1,...,6
and then connect point 1, point 2, point 3... Does anyone know how to draw it? Thanks!
推荐答案
你可以利用tikz
库
You can make use of the tikz
library
documentclass{minimal}
usepackage{tikz}
egin{document}
egin{tikzpicture}
% equidistant points and arc
foreach x [count=p] in {0,...,11} {
ode[shape=circle,fill=black, scale=0.5] (p) at (-x*30:2) {};};
foreach x [count=p] in {0,...,5} {
draw (-x*60:2.4) node {p};
draw (-30-x*60:2.4) node {$ar{p}$};};
draw (1) arc (0:360:2);
draw[dashed] (1) -- (3) -- (5) -- (1);
% axes
draw [dotted, gray] (-2.6,0) -- (2.6,0);
draw [dotted, gray] (0,-2.15) -- (0,2.15);
end{tikzpicture}
end{document}
这篇关于如何使用 LaTeX 画一个圆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文