Блог Федора Сарафанова

Исходники иллюстрации

pre.tex

\documentclass[tikz]{standalone}\input{pre.tex}\begin{document}\begin{tikzpicture}[
    force/.style={>=latex,draw=blue,fill=blue},
    % axis/.style={densely dashed,gray,font=\small},
    axis/.style={densely dashed,black!60,font=\small},
    M/.style={rectangle,draw,fill=lightgray,minimum size=0.5cm,thin},
    m2/.style={draw=black!30, rectangle,draw,thin, fill=blue!2, minimum width=0.7cm,minimum height=0.7cm},
    m1/.style={draw=black!30, rectangle,draw,thin, fill=blue!2, minimum width=0.7cm,minimum height=0.7cm},
    plane/.style={draw=black!30, very thick, fill=blue!5, line width=1pt},
    % base/.style={draw=black!70, very thick, fill=blue!4, line width=2pt},
    string/.style={draw=black, thick},
    pulley/.style={thick},
    acceleration/.style={>=open triangle 60,draw=blue,fill=blue},
    inforce/.style={force,double equal sign distance=2pt},
    interface/.style={
        pattern = north east lines,
        draw    = none,
        pattern color=gray!60,          
    },
    plank/.style={
        fill=black!60, 
        draw=black,
        minimum width=3cm,
        inner ysep=0.1cm,
        outer sep=0pt,
        yshift=0.75cm,
        pattern = north east lines,
        pattern color=gray!60, 
    },
    cargo/.style={
        rectangle,
        fill=black!70,              
        inner sep=2.5mm,
    }
]

\draw[scale=0.5,domain=0:2,smooth,variable=\x,blue] plot ({\x},{-\x*\x});
\draw[scale=0.5,domain=-2:2,smooth,variable=\x,blue] plot ({\x+4},{-0.8-0.8*\x*\x});
\draw[scale=0.5,domain=-2:2,smooth,variable=\x,blue] plot ({\x+8},{-1.6-0.6*\x*\x});
\draw[scale=0.5,domain=-2:2,smooth,variable=\x,blue] plot ({\x+12},{-2.4-0.4*\x*\x});
\draw[dashed,scale=0.5,domain=-2:2,smooth,variable=\x,blue] plot ({\x+16},{-3.2-0.2*\x*\x});

\draw[axis, ->] (0,-2) -- ++(10,0) node[right] {$+x$};
\draw[axis, ->] (0,-2) -- ++(0,3) node[right] {$+y$};
\draw[axis] (0,-2) -- ++(-0.5,0);
\draw[axis] (0,0) coordinate (0) -- ++(-0.5,0);

\draw[<->] (-0.5,-2) -- node[left] {$h$} ++ (0,2);
\draw[force,->] (0) -- ++(0.5,0) node[right] {$\vec{v}_0$};

\draw[acceleration, ->] (4,1) -- node[right] {$\vec{g}$} (4,0);

\end{tikzpicture}\end{document}