Truncated Cylinder


Edit and compile if you like:

% File name: truncated-cylinder.tex
% Description: 
% A geometric representation of a truncated cylinder is shown.
% Date of creation: April, 9th, 2021.
% Date of last modification: October, 9th, 2022.
% Author: Efran Soto Apolinar.
% Source: page 44 of the 
% Glosario Ilustrado de Matem\'aticas Escolares.
% Terms of use:
% According to
% Your commitment to the terms of use is greatly appreciated.
		% Base of the truncated cylinder
		\draw[thick,fill=cyan!35,opacity=0.75] plot[domain=0:6.2832,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{0.0});
		\draw[red,thick,dashed] plot[domain=1.570796327:4.71238898,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{0.0}); 
		% Vertical wall (back, external radius)
		\fill[gray!35,opacity=0.5] (0,\r,0) 
			-- plot[domain=1.571:4.71238898,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{0})
			-- (0,-\r,4) 
			-- plot[domain=4.71238898:1.571,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{4.0-\r*sin(\t r)})
			-- (0,\r,0);	
		% Vertical wall (front, external radius)
		\fill[cyan!35,opacity=0.5] (0,-\r,0) 
			-- plot[domain=-1.571:1.571,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{0}) 
			-- (0,\r,2.0) 
			-- plot[domain=1.571:-1.571,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{4.0-\r*sin(\t r)}) 
			-- (0,-\r,0);
		% section of the plane (cut by a plane)
		\draw[thick] plot[domain=0:6.2832,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{4.0-\r*sin(\t r)});
		% The cylinder (vertical wall
		\foreach \angulo in {0,0.05,...,6.3}{
				\pgfmathparse{2.0*cos(\angulo r)}
				\pgfmathparse{2.0*sin(\angulo r)}
				\draw[cyan] (\px,\py,0) -- (\px,\py,4.0-\py);
		\fill[cyan!35,opacity=0.75] plot[domain=0:6.2832,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{4.0-\r*sin(\t r)});
		% Circumferences bounding the cylinder
		\draw[red,thick] plot[domain=0:6.2831853,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{4.0-\r*sin(\t r)}); 
		\draw[red,thick] plot[domain=-1.570796327:1.570796327,smooth,variable=\t] ({\r*cos(\t r)},{\r*sin(\t r)},{0.0}); 
		% lengths and indication of points
		\draw[dash dot dot] (0,0,-1) -- (0,0,6);
		\draw[dash dot dot] (0,-\r,6) -- (0,\r,2);
		\draw[dash dot dot] (-\r,0,4) -- (\r,0,4);
		\draw[dash dot dot] (0,0,4) -- (0,\r+1.5,4);
		\draw[dash dot dot] (-\r,0,0) -- (\r,0,0);
		\draw[dash dot dot] (0,-\r-1.0,0) -- (0,\r+1.5,0);
		\draw[dash dot dot] (0,-\r-1.0,6) -- (0,-\r,6);
		\draw[dash dot dot] (0,\r,5.5) -- (0,\r,2) -- (0,\r+1,2);
		\draw[thick,<->] (0,0,5) -- (0,\r,5) node [midway,fill=white] {$r$};
		\draw[thick,<->] (0,\r+0.5,0) -- (0,\r+0.5,2) node [midway,fill=white] {$h_{1}$};
		\draw[thick,<->] (0,-\r-0.5,0) -- (0,-\r-0.5,6) node [midway,fill=white] {$h_{2}$};
		\draw[thick,<->] (0,\r+1.0,0) -- (0,\r+1.0,4) node [midway,fill=white] {$h$};

Click to download: truncated-cylinder.textruncated-cylinder.pdf
Open in Overleaf:
See more on the author page of Efraín Soto Apolinar.

Leave a Reply

Your email address will not be published.