6

As a novice in TikZ I tried to draw the four so called Euler-cases (Knickfälle/Buckling; https://en.wikipedia.org/wiki/Buckling).

I got that far: Euler buckling, not quite correct

But it should rather look like this:

Euler buckling, correct

As you can see the third and the fourth bended line aren't correct. How can I achieve the correct bended form?

I take every hint I can get - even to make my TikZ look similar to the original one.

Thats me code:

\documentclass{standalone}
\usepackage{tikz}

\usetikzlibrary{patterns}
\usetikzlibrary{arrows}
\pgfdeclarepatternformonly{north east lines wide}{\pgfqpoint{-1pt}    {-1pt}}{\pgfqpoint{10pt}{10pt}}{\pgfqpoint{9pt}{9pt}}%
{
\pgfsetlinewidth{0.2pt}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
\pgfpathlineto{\pgfqpoint{10pt}{10pt}}
\pgfusepath{stroke}
}


\tikzset{%
body/.style={inner sep=0pt,outer     sep=0pt,shape=rectangle,draw,thick,pattern=north east lines wide},
dimen/.style={<->,>=latex,thin,every rectangle node/.style=    {fill=white,midway,font=\sffamily}},
symmetry/.style={dashed,thin},
}

\begin{document}
\begin{tikzpicture}
\node [body,minimum height=0.5cm,minimum width=2cm,anchor=north]     (ground) at (0,0) {};

\node[anchor=north] at (0,0) (A) {};%ground
\node[anchor=south] at (0,4.7) (B) {};%straight end
\node[anchor=south] at (1.5,4.7) (C) {};%bended end
\draw[line width=1mm, dashed, blue!30](A) -- (B);
\draw[line width=1mm, bend left=20,blue](A) edge (C);
\draw (-1.5,0) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
\draw (-1.5,4.7) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
\draw [dimen] (A’) -- (B’) node {L};%Dimension
\draw [-latex, line width=.7mm, red] (1.5,6) -- node[pos=0.7,left]{F}(C);  %arrow

\end{tikzpicture}
\begin{tikzpicture}
\node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};

\node at (0,.5) (A) {};%ground
\node at (0,5) (B) {};%straight end
\node at (0,5) (C) {};%bended end
\draw[line width=1mm, dashed, blue!30](A) -- (B);
\draw[line width=1mm, bend right,blue](A) edge (C);
\draw (-1.5,0.5) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
\draw (-1.5,5) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
\draw [dimen] (A’) -- (B’) node {L};
\draw [-latex, line width=.7mm, red] (0,6) -- node[pos=.7,left]{F}(C) ;  
\draw[line width = 0.5mm](-.25,0) -- (0,.5);
\fill (A) circle [radius=4pt];
\draw[line width = 0.5mm](.25,0) -- (0,.5);
%
\node [body,minimum height=1cm,minimum width=.25cm,anchor=east] (topleft) at (-.5,5) {};
\node [body,minimum height=1cm,minimum width=.25cm,anchor=west] (topright) at (.5,5) {};
\draw[line width = 0.5mm](-.5,4.8) -- (.5,5.2);
\fill (B) circle [radius=4pt];
\draw[line width = 0.5mm](-.5,5.2) -- (.5,4.8);
\end{tikzpicture}
\begin{tikzpicture}
\node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};

\node[anchor=north] at (0,0) (A) {};%ground
\node at (0,4.8) (B) {};%straight end
\node at (0,4.8) (C) {};%bended end
\draw[line width=1mm, dashed, blue!30](A) -- (B);
\draw[line width=1mm, bend right,blue](A) edge (C);
\draw (-1.5,0) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
\draw (-1.5,4.8) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
\draw [dimen] (A’) -- (B’) node {L};
\draw [-latex, line width=.7mm, red] (0,6) -- node[pos=.7,left]{F}(C) ;  
%
\node [body,minimum height=1cm,minimum width=.25cm,anchor=east] (topleft) at (-.5,4.8) {};
\node [body,minimum height=1cm,minimum width=.25cm,anchor=west] (topright) at (.5,4.8) {};
\draw[line width = 0.5mm](-.5,4.6) -- (.5,5);
\fill (B) circle [radius=4pt];
\draw[line width = 0.5mm](-.5,5) -- (.5,4.6);
\end{tikzpicture}
\begin{tikzpicture}
\node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};

\node[anchor=north] at (0,0) (A) {};%ground
\node [anchor=south] at (0,4.8) (B) {};%straight end
\node [anchor=south] at (0,4.8) (C) {};%bended end
\draw[line width=1mm, dashed, blue!30](A) -- (B);
\draw[line width=1mm, bend right,blue](A) edge (C);    
\draw (-1.5,0) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
\draw (-1.5,4.8) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
\draw [dimen] (A’) -- (B’) node {L};
\draw [-latex, line width=.7mm, red] (0,6) -- node[pos=.7,left]{F}(C) ;  
%
\node [body,minimum height=1cm,minimum width=.25cm,anchor=east] (topleft) at (-.15,4.4) {};
\node [body,minimum height=1cm,minimum width=.25cm,anchor=west](topright) at (.15,4.4) {};

\end{tikzpicture}
\end{document}
1
  • 1
    Post your code. A minimal compilable snippet. That way you help everyone and ease the chance of helping. For the third one you can play with looseness in and looseness out (IIRC the name of the keys) and with in and out angles, and for the last one, just add a middle point where you want it to go through.
    – Manuel
    Jul 22, 2016 at 23:15

2 Answers 2

9

You can use in the third one

\draw[line width=1mm,blue] (A) to[out=90,in=300,out looseness=1.3] (C);

and in the last one

\coordinate (aux) at (.5,2.4);
\draw[line width=1mm,smooth,blue] (A) to[out=90,in=270] (aux) to[out=90,in=270] (C);    

To get the end of the last line to be straight, you can do

\coordinate (aux) at (.5,2);
\draw[line width=1mm,smooth,blue](A) to[out=90,in=270] (aux) to[out=90,in=270] ([yshift=-.8cm]C) -- (C);  
2
  • thank you. The third case seems to work properly. Can you modify the fourth that the line between the blocks is straight until the end? Jul 22, 2016 at 23:51
  • 3
    Done, there are many ways (you might find useful \tikzlibrary{calc} which may come in handy, look at the documentation).
    – Manuel
    Jul 23, 2016 at 5:59
6

Thanks to @Manuel I could modify the code to complete the drawing:

Euler-cases

This is the code I used:

\documentclass{standalone}
\usepackage{xcolor,tikz}
\usetikzlibrary{patterns}
\usetikzlibrary{arrows}
\pgfdeclarepatternformonly{north east lines wide}{\pgfqpoint{-1pt}        {-1pt}}{\pgfqpoint{10pt}{10pt}}{\pgfqpoint{9pt}{9pt}}%
{
\pgfsetlinewidth{0.2pt}
\pgfpathmoveto{\pgfqpoint{0pt}{0pt}}
\pgfpathlineto{\pgfqpoint{10pt}{10pt}}
\pgfusepath{stroke}
}

\tikzset{%
    body/.style={
        inner sep=0pt,
        outer sep=0pt,
        shape=rectangle,
        draw,
        color=mybrown,
        thick,
        pattern=north east lines},%
dimen/.style={
    <->,
    >=latex,
    thick,
    every rectangle node/.style={
        fill=white,
        midway,
        font=\sffamily,
        }
    },%
}

\definecolor{myblue}{RGB}{0,65,137} % HEX 004189
\definecolor{mygreen}{RGB}{147,193,26} % HEX 93C11A
\definecolor{myred}{RGB}{204,35,20} % HEX CC2314
\definecolor{mybrown}{RGB}{255,162,0} % HEX FFA200

\begin{document}
    \begin{tikzpicture}
    \node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};
    \coordinate (A) at (0,0);
    \coordinate (B) at (0,4.7);
    \coordinate (C) at (1.5,4.7);
    \draw[line width=1mm, dashed, mygreen!50](A) -- (B);
    \draw[line width=1mm, bend left=18,myblue](A) edge (C);
    \draw (-1.5,0) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
    \draw (-1.5,4.7) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
    \draw [dimen] (A’) -- (B’) node {L};%Dimension
    \draw [-latex, line width=.7mm, myred,] (1.5,6) -- node[pos=0.5,left]{$F_k$}(C) ;  %arrow
    \end{tikzpicture}

    \begin{tikzpicture}
    \node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};
    \coordinate (A) at (0,15pt);
    \coordinate (B) at (0,4.8);
    \coordinate (C) at (0,4.8);
    \draw[line width=1mm, dashed, mygreen!50](A) -- (B);
    \draw[line width=1mm, bend right,myblue](A) edge (C);
    \draw (-1.5,0.5) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
    \draw (-1.5,5) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
    \draw [dimen] (A’) -- (B’) node {L};
    \draw [-latex, line width=.7mm, myred,] (0,6) -- node[pos=.1,left]{$F_k$}([yshift=4pt]B) ;  
    \draw[line width = 0.5mm](-.25,0) -- (0,.5);
    \fill (A) circle [radius=4pt];
    \draw[line width = 0.5mm](.25,0) -- (0,.5);

    \node [body,minimum height=1cm,minimum width=.25cm,anchor=east] (topleft) at (-.5,4.8) {};
    \node [body,minimum height=1cm,minimum width=.25cm,anchor=west] (topright) at (.5,4.8) {};
    \draw[line width = 0.5mm](-.5,4.6) -- (.5,5);
    \fill (B) circle [radius=4pt];
    \draw[line width = 0.5mm](-.5,5) -- (.5,4.6);
    \end{tikzpicture}


    \begin{tikzpicture}
    \node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};
    \coordinate (A) at (0,0);
    \coordinate (B) at (0,4.8);
    \coordinate (C) at (0,4.8);
    \draw[line width=1mm, dashed, mygreen!50](A) -- (B);
    \draw[line width=1mm,myblue] (A) to[out=90,in=310,out looseness=1.3] (C);

    \draw (-1.5,0) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
    \draw (-1.5,4.8) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
    \draw [dimen] (A’) -- (B’) node {L};
    \draw [-latex, line width=.7mm, myred,] (0,6) -- node[pos=.1,left]{$F_k$}([yshift=4pt]B) ;  

    \node [body,minimum height=1cm,minimum width=.25cm,anchor=east] (topleft) at (-.5,4.8) {};
    \node [body,minimum height=1cm,minimum width=.25cm,anchor=west] (topright) at (.5,4.8) {};
    \draw[line width = 0.5mm](-.5,4.6) -- (.5,5);
    \fill (B) circle [radius=4pt];
    \draw[line width = 0.5mm](-.5,5) -- (.5,4.6);
    \end{tikzpicture}

    \begin{tikzpicture}
    \node [body,minimum height=0.5cm,minimum width=2cm,anchor=north] (ground) at (0,0) {};
    \coordinate (A) at (0,0);
    \coordinate (B) at (0,4.8);
    \coordinate (C) at (0,4.8);
    \draw[line width=1mm, dashed, mygreen!50](A) -- (B);
    \coordinate (aux) at (1,2);
    \draw[line width=1mm,smooth,myblue](A) to[out=90,in=270] (aux) to[out=90,in=270] ([yshift=-.8cm]C) -- (C); 
    \draw (-1.5,0) -- ++(.1,0) coordinate (A’) -- +(15pt,0);
    \draw (-1.5,4.8) -- ++(.1,0) coordinate (B’) -- +(15pt,0);
    \draw [dimen] (A’) -- (B’) node {L};
    \draw [-latex, line width=.7mm, myred,] (0,6) -- node[pos=.5,left]{$F_k$}(B) ;  

    \node [body,minimum height=1cm,minimum width=.25cm,anchor=east] (topleft) at (-.1,4.4) {};
    \node [body,minimum height=1cm,minimum width=.25cm,anchor=west](topright) at (.1,4.4) {};
    \end{tikzpicture}
\end{document}

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.