1

enter image description here

I just did the figure on the front. How to complete this code to get an idea of 3D figure?

Here is a starting code.

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}

\usepackage[portuguese]{babel}


\usepackage{color}

\usepackage{tikz}
        
\usepackage{tkz-euclide}

\usetikzlibrary{patterns}

\usetikzlibrary{calc}

\usetikzlibrary{shapes}

\begin{document}
    
    \begin{center}

        \begin{tikzpicture}[scale=.7]

            \draw[pattern=north west lines] (0,0) circle [radius=2];

            \draw[pattern=north west lines] (4,0) circle [radius=2];

            \draw[pattern=north west lines] (8,0) circle [radius=2];

            \draw[pattern=north west lines] (2,2*3^.5) circle [radius=2];

            \draw[pattern=north west lines] (6,2*3^.5) circle [radius=2];

            \draw[pattern=north west lines] (4,4*3^.5) circle [radius=2];

            \node at (0,2){$\bullet$};

            \node at (4,2){$\bullet$};

            \node at (2,2+2*3^.5){$\bullet$};

            \node at (4,4*3^.5+2){$\bullet$};

            \node at (6,2+2*3^.5){$\bullet$};

            \node at (8,2){$\bullet$};

            \draw[ultra thick,fill=brown!90] (0,0) circle [radius=1.8];

            \draw[ultra thick,fill=brown!90] (4,0) circle [radius=1.8];

            \draw[ultra thick,fill=brown!90] (8,0) circle [radius=1.8];

            \draw[ultra thick,fill=brown!90] (2,2*3^.5) circle [radius=1.8];

            \draw[ultra thick,fill=brown!90] (6,2*3^.5) circle [radius=1.8];

            \draw[ultra thick,fill=brown!90] (4,4*3^.5) circle [radius=1.8];
            
        \end{tikzpicture}

    \end{center}

\end{document}

enter image description here

3
  • 2
    You should try and draw one of these barrels as a pic and position them as you want instead of repeating the same code six times.
    – SebGlav
    Feb 27 at 14:26
  • SebGlav - Excuse me, how do I do that? Feb 27 at 14:49
  • One of your previous questions was answered using pic. You could learn from that one and come back with a specific question about what you have struggled with. Did you try and draw one barrel in the first place?
    – SebGlav
    Feb 27 at 17:48

0

Your Answer

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

Browse other questions tagged or ask your own question.