I've got a (parametrised) truncated cylinder using the code below:
\documentclass[crop,tikz]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis line style = {draw=none},ticks = none]
\def\h{.2}
\def\r{1}
\def\R{2}
%\def\ang{2}
%\begin{scope}[rotate around x=pi/2,rotate around z=\ang]
%\draw[->] (0:0) arc (0:10:1);
%\end{scope}
\addplot3 [surf,color=black,faceted color=black,opacity=.1,domain=0:2*pi,y domain=0:1,samples=50,samples y=15] ({((\r-\R)*y+\R)*cos(deg(x))},{((\r-\R)*y+\R)*sin(deg(x))},{y*\h});
\end{axis}
\end{tikzpicture}
\end{document}
I'm looking to add a (parametrised) line on the bottom plane, a line on the cylinder, an arc between the two lines, and a node to label the angle the cylinder makes with the horizontal plane, depicted in red below:
The parameter is the angle (\ang
in the code and the blue bit in the picture above) of the plane around the vertical axis in in which to draw this triangular arc thing. Of course the $\theta$
angle is also a parameter, it should be atan(\h/(\R-\r))
where in the code I have put 10
, since even that hasn't yet worked for me. Attempts using the commented out code with \draw[...] ... arc ...
have borne no fruit.