Drawing a shape made up of circles in latex (Part 1)

Below is the latex code I used to create diagrams like this.


\newcommand{\circledone}[3]{        
% draws a square with quarter circles off edges
% takes 3 inputs, #1 side, #2 rotation of shape, #3 side label
\begin{tikzpicture}[rotate=#2]
    \filldraw [fill=blue,fill opacity=0.3,thick](0,0) arc (-90:-180:#1) -- (0,#1) arc (180:90:#1) --(#1,#1) arc (0:-90:#1);
    % (4,4)--(4,0)--cycle;
    %\draw (4,4) arc (0:-90:4);
    \draw [dashed,thick,to-to] (0,0)--(0,#1) node [sloped,rotate=#2,above,midway]{#3};
    \draw [dashed,thick,to-to] (0,#1)--(#1,#1) node [sloped,rotate=#2,above,midway]{#3};
\end{tikzpicture}
}
Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.