
これまで少しは完成しましたが、やり方がよくわかりません。特に、座標系をどうするかがまだよくわかっていないからです。ちなみに、下のシリンダーには矢印が付いていて、半径が 5.1 CM であることを示しています。
\begin{tikzpicture}
\draw [help lines] (0,0) grid (16,10);
\node [ anchor=south west, minimum width=20,minimum height=10] (Response) at (0,0) {};
\draw [draw=black, very thick] (0,8) rectangle (8,10);
\draw [draw=red, dashed, very thick] (3,8) rectangle (5,5);
\end{tikzpicture}
座標系がまったく理解できません。どうすればもっとよく理解できるでしょうか?
答え1
自分でこれらのことを実行できるように、概念的な小さな質問をしたほうがよいと思います。最も難しいのは、スクリーンショットから内容を解読することです (おそらく、いくつか読み間違えたと思います)。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{siunitx}
\usetikzlibrary{arrows.meta,quotes,positioning,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[m/.style={draw,minimum size=1.5em,label=right:$m$}]
\node[minimum width=9em,minimum height=3em,draw] (M) {$M=\SI{4.58}{\kilo\gram}$};
\draw[|-|] ([yshift=2ex]M.north west) -- node[fill=white]{$2R=\SI{27.5}{\centi\meter}$}
([yshift=2ex]M.north east);
\node[minimum width=2em,minimum height=3em,
path picture={
\draw[decoration={waves,radius=2em,segment length=3pt,pre length=0pt},decorate]
([yshift=2em]path picture bounding box.north) -- (path picture bounding box.south);
\draw ([xshift=\pgflinewidth/2]path picture bounding box.north west)
-- ([xshift=\pgflinewidth/2,yshift=3pt]path picture bounding box.south west)
([xshift=-\pgflinewidth/2]path picture bounding box.north east) --
([xshift=-\pgflinewidth/2,yshift=3pt]path picture bounding box.south east);
},below,label={[right]30:{$2r=\SI{5.1}{\centi\meter}$}}] (S) at (M.south){};
\draw ([xshift=0.5ex]S.south) |- ++ (-4em,-1ex) |- ++ (1ex,-1ex) -- ++ (0,1ex)
([xshift=-0.5ex]S.south) |- ++ (4em,-1ex) |- ++ (-1ex,-1ex) -- ++ (0,1ex);
\node[circle,draw,minimum size=1.5em,right=8em of S.south east] (C){};
\node[m,below=5em of C.east] (m1){};
\node[m,below=5em of m1] (m2){};
\draw[semithick] (m1) -- (C.east) arc[start angle=0,end
angle=90,radius=0.75em+0.5\pgflinewidth] --([yshift=0.5\pgflinewidth]C.north-|S.east);
\path[semithick,-Triangle,pos=0.9]
([yshift=0.5\pgflinewidth]C.north) edge ++ (-1,0)
(m1.center) edge["$T$"'] ++ (0,1)
(m1.center) edge["$m\,g$"] ++ (0,-1)
(m2.center) edge ++ (0,1)
(m2.center) edge ++ (0,-1);
\draw[|-|] ([xshift=-3em]m1.west) -- node[fill=white]
{$h=\SI{0.94}{\centi\meter}$} ([xshift=-3em]m2.west);
\end{tikzpicture}
\end{document}
将来的には、視覚検索似たような図から始めれば、たくさんあります。コードの一部に問題がある場合は、完全な例(断片ではなく)を投稿し、どの部分が問題を引き起こしているかを明確に示すように努める限り、質問が明確になり、よりよく受け入れられるようになります。