我正在尝试得到一个鲁洛三角形、内部三角形、半径和它的中点。我不知道如何将所有这些放入同一个图表中
答案1
这是对Mark Wibrow 的回答,希望我正确理解了维基百科文章。角的数量是奇数,n=2N+1
。您可以指定N
、半径和边与圆弧的样式,由于这些是图片,因此您可以应用常见的变换,例如旋转。
\documentclass[tikz,border=3mm]{standalone}
% based on https://tex.stackexchange.com/a/160705/194703
\tikzset{pics/Reuleaux polygon/.style={code={
\tikzset{Reuleaux/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/Reuleaux/##1}}
\pgfmathtruncatemacro{\myorder}{2*\pv{N}+1}
\path[pic actions,Reuleaux/edges] ({90}:\pv{r})
foreach \XX in {1,...,\the\numexpr\myorder-1}
{-- ({90+\XX*360/\myorder}:\pv{r})}
-- cycle;
\path[pic actions,Reuleaux/arcs]({90}:\pv{r})
foreach \XX in {0,...,\the\numexpr\myorder-1}
{[rotate={(\XX+0.25)*360/\myorder}]
arc(90:90+180/\myorder:{\pv{r}*cos(90/\myorder)*2})
};
}},Reuleaux/.cd,N/.initial=3,r/.initial=1cm,%<- radius
edges/.style={draw=black},%<- appearance of edges
arcs/.style={draw=blue}%<- appearance of arcs
}
\begin{document}
\begin{tikzpicture}
\path foreach \X in {1,...,4}
{(\X*3,0) pic{Reuleaux polygon={N=\X}}};
\end{tikzpicture}
\end{document}