6

I am having some problems in concluding a picture. This is my code:

\documentclass[border={10pt}]{standalone}
\usepackage{tikz}
\usetikzlibrary{patterns}

\begin{document}

 \begin{tikzpicture}[thick,>=latex,->]

    \begin{scope}
    \clip(-5,2) rectangle (5,-5);
    \filldraw[white] (-4.3,4.3) rectangle (4.3,0);
    \draw[double distance=1.6mm] (0,0) -- (3,-3) node[midway,xshift=4mm,yshift=2mm]{};
    \draw[double distance=1.6mm,dashed] (0,0) -- (0,-4.24) node[midway,xshift=4mm,yshift=2mm]{};
    \draw[draw=black,fill=white,dashed] (0,-4.24) circle circle (.3cm);
    \draw[double distance=1.6mm,dashed] (0,0) -- (-3,-3) node[midway,xshift=4mm,yshift=2mm]{};
    \draw[draw=black,fill=white,dashed] (-3,-3) circle circle (.3cm);
    \draw[fill=white] (-1.2,1.0) -- (-.5,0) arc(180:360:0.5) -- (1.2,1.0) -- cycle;
    \draw[draw=black,fill=white] (0, 0) circle circle (.3cm);
    \draw[draw=black,fill=white] (3,-3) circle circle (.3cm);
    \draw[pattern=north east lines] (-1.4,1.3) rectangle (1.4,1);
    \node at (.3,-.8) {$\theta_{d}$};   
    \end{scope}

\end{tikzpicture}

\end{document}

I get this result:

enter image description here

But I want to have something like this:

enter image description here

And I want to remove the horizontal grey lines from the linear part of the two "dashed" pendulum. Can you help me?

13

Here is my solution. I made some coordinates for left, middle and right. Also I've removed some unused code.

The thin horizontal grey lines may be a viewer problem.

\documentclass[border={10pt}]{standalone}
\usepackage{tikz}
\usetikzlibrary{patterns,calc,intersections}

\begin{document}

\begin{tikzpicture}[thick,>=latex]

    \begin{scope}
        \coordinate (l) at (-3,-3);
        \coordinate (m) at (0,-4.24);
        \coordinate (r) at (3,-3);

        % left
        \draw[double distance=1.6mm,dashed] (0,0) -- (l);
        \draw[draw=black,fill=white,dashed] (l) circle (.3cm);
        \draw let \p1=(l) in (\x1,-5) node {left};

        % middle
        \draw[double distance=1.6mm,dashed] (0,0) -- (m);
        \draw[draw=black,fill=white,dashed] (m) circle (.3cm);
        \draw let \p1=(m) in (\x1,-5) node {middle};

        % right
        \draw[double distance=1.6mm] (0,0) -- (r);
        \draw[draw=black,fill=white] (r) circle (.3cm);
        \draw let \p1=(r) in (\x1,-5) node {right};

        \draw[dashed,->] (l) to [bend right=45] (r);
        \draw[->] ($(m)!0.5!(0,0)$) to [bend right=22.5] ($(r)!0.5!(0,0)$);

        \draw[fill=white] (-1.2,1.0) -- (-.5,0) arc(180:360:0.5) -- (1.2,1.0) -- cycle;
        \draw[draw=black,fill=white] (0, 0) circle (.3cm);
        \draw[pattern=north east lines] (-1.4,1.3) rectangle (1.4,1);
        \node at (.3,-.8) {$\theta_{d}$};   
    \end{scope}

\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.