[Tex/LaTex] Draw a Hasse diagram with circles with 3 sectors

circlesdiagramstikz-pgf

enter image description here

Hello everybody,

I am try to draw the Hasse diagram (picture above) but I don't know.

Thanks for your help.

\documentclass[tikz,12pt]{standalone}
\begin{document}
\begin{tikzpicture}
  \fill [gray] (90:2) arc[start angle=90, end angle =210, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0); 
\end{tikzpicture}

\begin{tikzpicture}
  \fill [gray] (210:2) arc[start angle=210, end angle =330, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0); 
\end{tikzpicture}

\begin{tikzpicture}
  \fill [gray] (330:2) arc[start angle=-30, end angle =90, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0);
\end{tikzpicture}

\begin{tikzpicture}
  \fill [gray] (90:2) arc[start angle=90, end angle =210, radius=2cm] -- (0,0) -- cycle;
  \fill [gray] (210:2) arc[start angle=210, end angle =330, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0); 
\end{tikzpicture}

\begin{tikzpicture}
  \fill [gray] (90:2) arc[start angle=90, end angle =210, radius=2cm] -- (0,0) -- cycle;
  \fill [gray] (330:2) arc[start angle=-30, end angle =90, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0); 
\end{tikzpicture}

\begin{tikzpicture}
  \fill [gray] (210:2) arc[start angle=210, end angle =330, radius=2cm] -- (0,0) -- cycle;
  \fill [gray] (330:2) arc[start angle=-30, end angle =90, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0); 
\end{tikzpicture}

\begin{tikzpicture}
  \fill [gray] (90:2) arc[start angle=90, end angle =210, radius=2cm] -- (0,0) -- cycle;
  \fill [gray] (210:2) arc[start angle=210, end angle =330, radius=2cm] -- (0,0) -- cycle;
  \fill [gray] (330:2) arc[start angle=-30, end angle =90, radius=2cm] -- (0,0) -- cycle;
  \draw (0,0) circle (2cm) (90:2)--(0,0) (210:2)--(0,0) (330:2)--(0,0); 
\end{tikzpicture}

\end{document}

Best Answer

I'm sure you'll get some help with your TikZ, but while you are waiting, here is an alternative approach using Metapost. I've wrapped this up in luamplib so you should compile it with lualatex or work out how to adapt it for plain MP or pdflatex + GMP.

enter image description here

\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);

    % some points
    x1 = x3 = x6 = 0; -x2 = -x5 = x4 = x7 = 80;
    y2 = y3 = y4 = 0;
    -y1 = y5 = y6 = y7 = 80;

    % connect the dots
    draw z1 -- z2 -- z5 -- z3 -- z7 -- z4 -- cycle;
    draw z1 -- z3;
    draw z2 -- z6 -- z4;

    % routine to make a labelled node
    vardef node(expr description, state) = 
        save p, c; 
        path c; c = fullcircle scaled 42;
        picture p; p = image(
            unfill c;
            for i=-6 upto 6: draw (left--right) scaled 30 shifted (0,3i); endfor
            clip currentpicture to c;
            for i=1 upto 3:
                if substring(i-1,i) of state = "0":
                    unfill origin -- subpath((6+8(i-1))/3,(6+8i)/3) of c -- cycle;
                fi
            endfor
            for i=1 upto 3:
                draw origin -- point (6+8i)/3 of c withpen pencircle scaled 3/4;
            endfor
            draw c withpen pencircle scaled 1;
            label.lrt(description, point 6.25 of c);
        );
        p
    enddef;

    % mark each node ...
    draw node("$T_1$", "111") shifted z1;
    draw node("$T_2$", "110") shifted z2;
    draw node("$T_3$", "101") shifted z3;
    draw node("$T_4$", "011") shifted z4;
    draw node("$T_5$", "100") shifted z5;
    draw node("$T_6$", "010") shifted z6;
    draw node("$T_7$", "001") shifted z7;

endfig;
\end{mplibcode}
\end{document}