add tag
Anonymous 2004
I am new in laTeX, I am trying to draw this picture. I do not know how to start. 

![ScreenHunter 01.png](/image?hash=31bda80521483c665091832ee04c0fe906a72cf5be99253404f33f7a51bbdcc0)

How to draw it?
Top Answer
If you are willing to use the [3dtools library](, then you could access a couple of features that allow one to block out certain paths in order to make some objects appear to be behind or in front of other objects. Internally this just uses some clips but all the ordering is achieved with a one-liner
\tikzset{3d/draw ordered paths={bplane,cyl,L,R,M,tplane}}
which instructs Ti*k*Z to draw the bottom plane behind the halo of the cylinder, which in turn is behind some vertical lines, which are behind the top plane.
\begin{tikzpicture}[line cap=round,line join=round,same bounding box=A,
   		3d/install view={phi=20,theta=70},
		declare function={h=3;r=1.6;a=2.5;alpha=-90;}]
   \path (0,0,0) coordinate[label=below:{$O'$}] (O') 
   	(0,0,h) coordinate[label=above:{$O$}] (O)
    ({r*cos(alpha)},{r*sin(alpha)},0) coordinate[label=below:{$M'$}] (M')
	({r*cos(alpha)},{r*sin(alpha)},h) coordinate[label=above:{$M$}] (M);
   \draw[3d/hidden] (O)	-- (O');
   \path[save named path=M] (M) -- (M');
   \begin{scope}[canvas is xy plane at z=0,radius=r]
    \path[shift={(O')},save named path=bplane] (-a,-a) rectangle (a,a);
    \path[shift={(O)},save named path=tplane] (-a,-a) rectangle (a,a);
	\draw[shift={(O')},3d/hidden] (\pgfkeysvalueof{/tikz/3d/phi}:r) coordinate (L)
	 arc[start angle=\pgfkeysvalueof{/tikz/3d/phi},
	 	end	angle=\pgfkeysvalueof{/tikz/3d/phi}+180] coordinate (R);
	\draw[shift={(O')},3d/visible] (L)
	 arc[start angle=\pgfkeysvalueof{/tikz/3d/phi},
	 	end	angle=\pgfkeysvalueof{/tikz/3d/phi}-180];
	\draw[3d/visible] (O) circle;
   \begin{scope}[3d/screen coords]
	\path[save named path=L] (L) -- (L|-O);
	\path[save named path=R] (R) -- (R|-O);	
	\path[save named path=cyl] (L) -- (L|-O) -- (R|-O) -- (R) -- cycle;
   \tikzset{3d/ordered paths/.cd,cyl/.style={draw=none}}
   \tikzset{3d/draw ordered paths={bplane,cyl,L,R,M,tplane}}
![Screen Shot 2021-06-02 at 9.24.58 PM.png](/image?hash=ae6763f6c15684e98a5cfe7d6697796f88bed0773ae9fe9b01cddf3d8f83501d)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.