8

I would like to draw a circle divided into 3 parts with text inside, same in each of the three parts (in the middle), using tikzpicture environment. Something like:

Circle example

All the circle and its interior must be black, and the text of each part must be using \(...\).

MWE:

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}

\begin{document}

\begin{center}
    \begin{tikzpicture}
        \draw (0,0) circle (3);

    \end{tikzpicture}
\end{center}
\end{document}

MWE

Thank you!

6

The interception points of the lines with the circle can easily be calculated using trigonometric functions. Once these points are known, drawing is straight forward:

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}

\begin{document}

\begin{center}
    \begin{tikzpicture}
        \draw (0,0) circle (3);
                \draw (0,3) -- (0,0) -- (3*0.866,-3*0.5) (0,0) -- (-3*0.866,-3*0.5);
                \node at (0,-1.5) {$\{A,B\}$};
                \node at (1.5*0.866,1.5*0.5) {$\{A,B\}$};
                \node at (-1.5*0.866,1.5*0.5) {$\{A,B\}$};
    \end{tikzpicture}
\end{center}
\end{document}

enter image description here

  • Hmm... I forgot to mention that I would like to change the size of the circle. \draw (0,0) circle (3); is too big now I see, so \draw (0,0) circle (2); would be fine. Quacksorry! – manooooh Jul 26 '18 at 0:06
  • 1
    @manooooh Just replace all 3* by 2* and 1.5* by 1*. I deliberately did not include them in the calculation of the lengths to be able to change them easily. – user36296 Jul 26 '18 at 0:08
15

an alternative:

  • used polar coordinates
  • define radius of circle and with it also calculated distances of nodes from circle centre

    \documentclass[tikz, margin=3mm]{standalone}
    \usepackage[spanish]{babel}
    \usepackage[T1]{fontenc}
    \usetikzlibrary{babel}
    
    \begin{document}
        \begin{tikzpicture}
    \def\R{3cm} % defined radius of circle
    \draw (0,0) circle[radius=\R];
    \draw (0,0) -- (90:\R)    (0,0) -- (210:\R)     (0,0) -- (330:\R);
    %
    \node at ( 30:\R/2) {\(\{A,B\}\)};
    \node at (150:\R/2) {\(\{A,B\}\)};
    \node at (270:\R/2) {\(\{A,B\}\)};
        \end{tikzpicture}
    \end{document}
    

enter image description here

  • +1 for using polar coordinates. Students usually don't like to learn it. – Sigur Jul 26 '18 at 1:44
  • @Sigur, thank you very much! my experiences with students are similar ... – Zarko Jul 26 '18 at 6:00
5

Nobody proposed a circular node with its angular anchors.

\documentclass[tikz,border=2mm]{standalone} 

\begin{document}
\begin{tikzpicture}
\node[circle,draw, minimum width=4cm, outer sep=0pt] (a) {};
\foreach \i in {90,210,330}
    \draw (a.center)--(a.\i);

\foreach \i/\j in {30/{A,B},150/{E,F},270/{C,D}}
    \path (a.center) -- node {$\{\j\}$} (a.\i); 
\end{tikzpicture}
\end{document}

enter image description here

4

I copied some Zako's code. I use tkz-euclide. The points B and C are found with rotation.

\documentclass[border=1.5mm,12pt]{standalone}
\usepackage{fouriernc}
\usepackage{tkz-euclide,amsmath} 
\usetkzobj{all} 
\tikzset{line/.style = {thick}}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\def\R{2}
\tkzDefPoint(0,0){O}\tkzDefPoint(90:\R){A}
\tkzDefPointsBy[rotation=center O angle 360/3](A,B){B,C}
\tkzDrawCircle[R](O,\R cm)
\tkzDrawSegments[line](O,A O,B O,C)
\node at ( 30:\R/2) {\(\{A,B\}\)};
\node at (150:\R/2) {\(\{A,B\}\)};
\node at (270:\R/2) {\(\{A,B\}\)};
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.