2

Can someone show me how to make a similar picture like the one I present? I think I know how to do a circle and the letters and points but not how so make these areas and how to fill them with lines.

Any hint would mean a lot. This is from Artin´s Algebra book.

enter image description here

3
  • 3
    Creating irregular shapes is harder than regular shapes. Regardless of how you create them, I would first create a path (invisible), search for intersections (intersections tikzlibrary), provide a clip (inside a scope) then draw the shape. Dec 1, 2023 at 3:42
  • 3
    Or you could just clip the big circle, then draw the shapes in back-to-front order (using fill each time). Dec 1, 2023 at 3:45
  • If you post code for what you can do, somebody will probably help. Less likely if you leave it as a do-it-for-me. It's also not clear what, if anything matters about the shapes' shapes.
    – cfr
    Dec 1, 2023 at 7:38

1 Answer 1

5

You can download the image, cut it to a workable size and increase the brightness, import it to the file and by using grids you can position all the objects to be drawn, you can print the sheet and find the coordinates using a compass for example; then start drawing from the object that will be below and the rest that will cover it, and then finish by cutting the total and placing the texts in the same way; As you can see, it is difficult but not impossible.

RESULT:

enter image description here

MWE:

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{contour}
\usetikzlibrary{arrows.meta,backgrounds, shapes.geometric,patterns.meta,decorations.pathmorphing}

\pgfdeclarepattern{
    name=hatch,
    parameters={\hatchsize,\hatchangle,\hatchlinewidth},
    bottom left={\pgfpoint{-.1pt}{-.1pt}},
    top right={\pgfpoint{\hatchsize+.1pt}{\hatchsize+.1pt}},
    tile size={\pgfpoint{\hatchsize}{\hatchsize}},
    tile transformation={\pgftransformrotate{\hatchangle}},
    code={
        \pgfsetlinewidth{\hatchlinewidth}
        \pgfpathmoveto{\pgfpoint{-.1pt}{-.1pt}}
        \pgfpathlineto{\pgfpoint{\hatchsize+.1pt}{\hatchsize+.1pt}}
        \pgfpathmoveto{\pgfpoint{-.1pt}{\hatchsize+.1pt}}
        \pgfpathlineto{\pgfpoint{\hatchsize+.1pt}{-.1pt}}
        \pgfusepath{stroke}
    }
}

\tikzset{
    hatch size/.store in=\hatchsize,
    hatch angle/.store in=\hatchangle,
    hatch line width/.store in=\hatchlinewidth,
    hatch size=5pt,
    hatch angle=0pt,
    hatch line width=.5pt,
}

\begin{document}
    
\contourlength{1pt}
\begin{tikzpicture}[
    R/.style = {draw=#1,rectangle,fill=CYAN!30!white},
    C/.style = {draw=#1,circle,fill=white, fill opacity=1},
    E/.style = {draw=#1,ellipse,fill=white, fill opacity=1},
    P/.style = {postaction={pattern={Lines[angle=#1, line width=0.75pt, distance=6pt]}, pattern color=black!50}},
    D/.style = {decorate,decoration={random steps, segment length=2mm, amplitude=0.5mm}},
    */.tip={Circle[sep=-1pt,black,length=2pt]},
]

%Uncoment for get help lines to obtain coordinates.

%\draw (5,5) node{\includegraphics[height=10cm]{DownloadedImage.jpg}};
%%Grid in cm and mm units
%\draw[black!30,step=1mm] (0,0) grid (10,10);
%\draw[black!80,step=1cm,line width=0.2pt] (0,0) grid (10,10);
%\draw[|-|,line width=0.2pt] (0,10)++(0,3pt)-- ++(1cm,0) node[midway](n){};
%\draw[<-] (n.center) |- ++(10pt,5pt) node [anchor=180, inner sep=0pt]{\tiny \verb+1cm+};
%\foreach \i in {0,1,...,10}{
%   \draw(0,10mm*\i)++(-1em,0) node(temp){\sf\tiny\i} (temp)-- (0,10mm*\i);
%   \draw(10mm*\i,0)++(0,-1em) node(temp){\sf\tiny\i} (temp)-- (10mm*\i,0);
%}

% Visible things, order of drawing mathers.

\clip[draw] (5,5) circle (5cm);
\draw (3.6,6.4) node[C,minimum size=35mm,D]{};
\draw (3.1,9.1) node[C,minimum size=45mm,P=-80,D]{};
\draw (4.9,3.7) node[C,minimum size=39mm,D]{};
\draw (8.3,2.7) node[C=,minimum size=39mm,postaction={pattern=hatch, pattern color=black!50, hatch size=10pt, hatch angle=50},D]{};
\draw (5.5,0) node[E,minimum height=39mm,minimum width=29mm,rotate=-15,scale=1.7,D]{};
\draw (3.2,1) node[E,minimum height=39mm,minimum width=25mm,rotate=-30,scale=1.4,P=10,D]{};
\draw (0.3,5.6) node[E,minimum height=39mm,minimum width=25mm,rotate=24,scale=1.8,D]{};
\draw (1.8,3) node[E,minimum height=39mm,minimum width=29mm,rotate=-18,scale=1.2,D]{};

\foreach \xpos/\ypos/\state/\txt/\ori in{
    3.5/1//bN/0,
    4/2/fill/b/0,
    1.7/2.8/fill/1/0,
    2.2/4//N/0,
    2.6/8/fill/a/0,
    3.5/9//aN/0,
    8/2.6/fill/ab/0,
    7.5/4//abN/0%
}{
    \draw(\xpos,\ypos) node[\state,circle,label={[scale=1.5]\ori:\contour{white}{$\txt$}},scale=0.7] {};
}

 \end{tikzpicture}

\end{document}

PROCESS:

enter image description here

HELP IMAGE BACKGROUND AND GRIDS

enter image description here

CODE:

\draw (5,5) node{\includegraphics[height=10cm]{DownloadedImage.jpg}};
%Grid in cm and mm units
\draw[black!30,step=1mm] (0,0) grid (10,10);
\draw[black!80,step=1cm,line width=0.2pt] (0,0) grid (10,10);
\draw[|-|,line width=0.2pt] (0,10)++(0,3pt)-- ++(1cm,0) node[midway](n){};
\draw[<-] (n.center) |- ++(10pt,5pt) node [anchor=180, inner sep=0pt]{\tiny \verb+1cm+};
\foreach \i in {0,1,...,10}{
    \draw(0,10mm*\i)++(-1em,0) node(temp){\sf\tiny\i} (temp)-- (0,10mm*\i);
    \draw(10mm*\i,0)++(0,-1em) node(temp){\sf\tiny\i} (temp)-- (10mm*\i,0);
}

ADDENDUM

To draw things after a cropped area, you must enter it in a scope environment, then add the new code afterwards, in case make the circle thicker, I add the code \draw[draw, line width=2pt] (5,5) circle (5cm);

ONE MORE RESULT:

enter image description here

CODE:

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{contour}
\usetikzlibrary{arrows.meta,backgrounds, shapes.geometric,patterns.meta,decorations.pathmorphing}

\pgfdeclarepattern{
    name=hatch,
    parameters={\hatchsize,\hatchangle,\hatchlinewidth},
    bottom left={\pgfpoint{-.1pt}{-.1pt}},
    top right={\pgfpoint{\hatchsize+.1pt}{\hatchsize+.1pt}},
    tile size={\pgfpoint{\hatchsize}{\hatchsize}},
    tile transformation={\pgftransformrotate{\hatchangle}},
    code={
        \pgfsetlinewidth{\hatchlinewidth}
        \pgfpathmoveto{\pgfpoint{-.1pt}{-.1pt}}
        \pgfpathlineto{\pgfpoint{\hatchsize+.1pt}{\hatchsize+.1pt}}
        \pgfpathmoveto{\pgfpoint{-.1pt}{\hatchsize+.1pt}}
        \pgfpathlineto{\pgfpoint{\hatchsize+.1pt}{-.1pt}}
        \pgfusepath{stroke}
    }
}

\tikzset{
    hatch size/.store in=\hatchsize,
    hatch angle/.store in=\hatchangle,
    hatch line width/.store in=\hatchlinewidth,
    hatch size=5pt,
    hatch angle=0pt,
    hatch line width=.5pt,
}

\begin{document}
    
    \contourlength{1pt}
    \begin{tikzpicture}[
        R/.style = {draw=#1,rectangle,fill=CYAN!30!white},
        C/.style = {draw=#1,circle,fill=white, fill opacity=1},
        E/.style = {draw=#1,ellipse,fill=white, fill opacity=1},
        P/.style = {postaction={pattern={Lines[angle=#1, line width=0.75pt, distance=6pt]}, pattern color=black!50}},
        D/.style = {decorate,decoration={random steps, segment length=2mm, amplitude=0.5mm}},
        */.tip={Circle[sep=-1pt,black,length=2pt]},
        ]
        
        \draw[draw, line width=2pt] (5,5) circle (5cm);
        \begin{scope}
            \clip[draw] (5,5) circle (5cm);
            \draw (3.6,6.4) node[C,minimum size=35mm,D]{};
            \draw (3.1,9.1) node[C,minimum size=45mm,P=-80,D]{};
            \draw (4.9,3.7) node[C,minimum size=39mm,D]{};
            \draw (8.3,2.7) node[C=,minimum size=39mm,postaction={pattern=hatch, pattern color=black!50, hatch size=10pt, hatch angle=50},D]{};
            \draw (5.5,0) node[E,minimum height=39mm,minimum width=29mm,rotate=-15,scale=1.7,D]{};
            \draw (3.2,1) node[E,minimum height=39mm,minimum width=25mm,rotate=-30,scale=1.4,P=10,D]{};
            \draw (0.3,5.6) node[E,minimum height=39mm,minimum width=25mm,rotate=24,scale=1.8,D]{};
            \draw (1.8,3) node[E,minimum height=39mm,minimum width=29mm,rotate=-18,scale=1.2,D]{};
            
            \foreach \xpos/\ypos/\state/\txt/\ori in{
                3.5/1//bN/0,
                4/2/fill/b/0,
                1.7/2.8/fill/1/0,
                2.2/4//N/0,
                2.6/8/fill/a/0,
                3.5/9//aN/0,
                8/2.6/fill/ab/0,
                7.5/4//abN/0%
            }{
                \draw(\xpos,\ypos) node[\state,circle,label={[scale=1.5]\ori:\contour{white}{$\txt$}},scale=0.7] {};
            }
        \end{scope}
        
        \draw[draw, line width=2pt] (5,5) circle (5cm);
            
    \end{tikzpicture}
    
\end{document}
3
  • 1
    That is great work, the process makes sense, I think I can learn it, thanks very much for your time and effort! Dec 1, 2023 at 11:35
  • I wanted to ask how one can make the circle thicker? Dec 13, 2023 at 15:43
  • 1
    @calculatormathematical , I added something about it
    – J Leon V.
    Dec 13, 2023 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .