Edit and compile if you like:
\documentclass{article}\usepackage{tikz}\usepackage{tikz-3dplot}\usetikzlibrary{math}\usepackage[active,tightpage]{preview}\PreviewEnvironment{tikzpicture}\setlength\PreviewBorder{0.125pt}%% File name: general-cylinder.tex% Description:% A geometric representation of a general cylinder is shown.%% Date of creation: March, 7th, 2021.% Date of last modification: October, 9th, 2022.% Author: Efraín Soto Apolinar.% https://www.aprendematematicas.org.mx/author/efrain-soto-apolinar/instructing-courses/% Source: page 44 of the% Glosario Ilustrado de Matem\'aticas Escolares.% https://tinyurl.com/5udm2ufy%% Terms of use:% According to TikZ.net% https://creativecommons.org/licenses/by-nc-sa/4.0/% Your commitment to the terms of use is greatly appreciated.%\begin{document}%\tdplotsetmaincoords{60}{140}%\begin{tikzpicture}[tdplot_main_coords]\pgfmathsetmacro{\h}{3}\pgfmathsetmacro{\a}{3}\pgfmathsetmacro{\f}{1.0}\pgfmathsetmacro{\xi}{0.0}\pgfmathsetmacro{\xf}{2.0*pi}\pgfmathsetmacro{\step}{0.0025*(\xf-\xi)}\pgfmathsetmacro{\xs}{\xi+\step}\pgfmathsetmacro{\xa}{\xf-\step}% Coordinate axis\draw[thick,->] (-0.25,0,0) -- (\xf+0.5,0,0) node [below] {$x$};\draw[thick,->] (0,-0.25,0) -- (0,1.5,0) node [right] {$y$};
Click to download: general-cylinder.tex • general-cylinder.pdf
Open in Overleaf: general-cylinder.tex
See more on the author page of Efraín Soto Apolinar.