I'm trying to get a reuleaux triangle, the interior triangle, the radius, and its midpoint. I don't know how to get all of that into the same diagram
Asked
Active
Viewed 108 times
0
1 Answers
4
This is a modest generalization of Mark Wibrow's answer, hoping that I interpreted the Wikipedia article correctly. The number of corners is odd, n=2N+1. You can specify N, the radius and the style of edges vs. arcs, and since these are pics, you can apply the usual transformations like rotations.
\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}

geometrypackage. Replaced it with [shapes]. – barbara beeton Nov 22 '19 at 03:04