绘制圆柱体

绘制圆柱体

我正在尝试绘制这幅图

我的代码是

\documentclass[11pt,a4paper]{book}
\usepackage{kerkis}
\usepackage{tikz}
\definecolor{Darkgreen}{rgb}{0,0.4,0}
\definecolor{Darkblue}{rgb}{0,0,0.4}
\begin{document}
\begin{tikzpicture}

\draw (0,0) ellipse (1cm and 3cm);
\draw (0,0) ellipse (0.7cm and 2.1cm);
%\draw (0cm,0cm) circle (2cm); 
%\draw (0cm,0cm) circle (3cm);

\draw (0,3) -- (3,4);
\draw (0,-3) -- (3,-2);

%% First clip 
\path[clip] (4cm,5cm) --  (4cm,-3cm) -- (-4,-3) -- (-4,5) -- cycle;
%%The circle 
%\node[circle,draw=black,minimum size=13cm] at (-10cm,1cm) (circ) {};

%\draw (3,4) arc (0:-30:13cm);
\draw (-9.5,1) circle (13cm);%This circle crosses desired points in a desired arc angle

\end{tikzpicture}
\end{document}

首先,我不知道绘制正面的最佳方法。我使用了椭圆和圆形,但似乎无法产生相同的效果。其次,我不知道如何正确放置右侧的圆弧。

我丑陋的输出是

答案1

实用且半自动化的...

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,calc}
\begin{document}
\begin{tikzpicture}
\begin{scope}[rotate=15]
\node[transform shape,ellipse,minimum height=2cm,minimum width=1cm,draw,outer sep=0] (a) {};
\clip[scale=0.8,postaction={line width=0.8pt,draw}] (a) circle (0.5 and 1);
\draw[scale=0.8] ([shift={($0.75*({cos(15)},{sin(15)})$)}]a) circle (0.5 and 1);
\draw(a.west) -- (a.east);
\end{scope}
\begin{scope}[rotate=15]
\draw (a.north) --  ++(0.75,0) arc (90:-90:0.5cm and 1cm-2\pgflinewidth) -- (a.south);
\draw (a.east) ++(0.75,0) -- ++(1cm,0) (a.west) ++(-0.75,0) -- ++(0.9cm,0);
\end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述


Thanos 编辑:

\begin{tikzpicture}[scale=3]
\begin{scope}[rotate=15]
\node[transform shape,ellipse,minimum height=2cm,minimum width=1cm,draw,outer sep=0]     (a) {};
\clip[scale=0.8,postaction={line width=0.8pt,draw}] (a) circle (0.5 and 1);
\draw[scale=0.8] ([shift={($0.75*({cos(15)},{sin(15)})$)}]a) circle (0.5 and 1);
\draw(a.west) -- (a.east);
\end{scope}
\begin{scope}[rotate=15]
\draw (a.north) --  ++(0.75,0) arc (90:-90:0.5cm and 1cm-2\pgflinewidth) -- (a.south);
\draw[->] (a.east) ++(0.75,0) -- ++(1cm,0);
\draw (a.west) ++(-0.75,0) -- ++(0.9cm,0);
\node at (-1,0.2) {$\vec{V}$};
\draw[->] (0,0) -- (-0.17,0.72);
\draw[<-] (-0.2,0.92) -- (-0.2715,1.15);
\node[above] at (-0.272,1.15) {$db$};
\node[right] at (-0.09,0.36) {$b$};
\draw (0,1.05) -- (0.06,1.3);
\draw (0+0.8,1.05+0.02) -- (0.06+0.8,1.3+0.02);
\draw[<->] (0.03,1.175) -- (0.03+0.8,1.175+0.02);
\node[above] at (0.03+0.4,1.175+0.02) {$dx$};
\end{scope}
\end{tikzpicture}

相关内容