1

tilted cylinder

I would like to draw a tilted cylinder on the plane \alpha. Can I draw this using latex tikz?

4
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{3d,shapes.geometric,positioning,intersections}
\begin{document}
\begin{tikzpicture}[font=\sffamily,scale=1.5,transform shape]
\begin{scope}[canvas is xz plane at y=0,transform shape]
\draw (-2,-3) rectangle (2,3);
\end{scope}
\node [cylinder,rotate=70,aspect=2,draw,
minimum height=3cm, minimum width=2cm+2*\pgflinewidth,
name path=cylinder] (cylinder) at (0.5,1,0) {};
\path[fill=white] (cylinder.195) coordinate[label=below:$A$](A) -- 
++(5:1) -- ++(-130:0.5) -- cycle;
\draw[rotate=-20,densely dashed,name path=hidden arc] ([yshift=\pgflinewidth]cylinder.before bottom) arc (0:180:1cm and 0.25cm);
\path[name path=aux2,overlay] (A) -- ++(0,6,0);
\draw[rotate=-20,densely dashed] ([yshift=\pgflinewidth]cylinder.before bottom) arc (0:-70:1cm and 0.25cm);
\draw[densely dashed] ([yshift=\pgflinewidth]cylinder.before bottom) --
++(70:0.1);
\path[name path=aux2,overlay] (A) -- ++(0,6,0);
\draw[name intersections={of=cylinder and aux2,total=\t}] (A)-- (intersection-3)
coordinate[label={above:$C$}](C);
\path (cylinder.before top) -- (cylinder.after top) coordinate[midway] (O2);
\node[fill,circle,scale=0.3,label={[right,yshift=-4pt]:$O_2$}] at (O2) {};
\path [name path=aux] (A) -- ++ (70:1);
\draw[densely dashed,name intersections={of=hidden arc and aux, by=X}] (A) -- (X) coordinate[label={[above,opacity=1]:$B$}] (B);
\node[below=1pt of cylinder.160] {$C_1$};
\node[above=1pt of cylinder.-20] {$C_2$};
\end{tikzpicture}
\end{document}

enter image description here

  • oh sorry. i'm not accustomed to this yet... – 김기훈 Aug 7 '18 at 0:29

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.