I would like to draw a cylinder , a circle and plane. Here is what I have so far:
\begin{tikzpicture}
\fill[top color=blue!50!,bottom color=blue!20! ,middle color=red!20!,shading=axis,opacity=0.6] (0,0) circle (2cm and 0.5cm);
\fill[left color=blue!50!,right color=blue!20! ,middle color=red!20! ,shading=axis,opacity=0.6] (2,0) -- (2,6) arc (360:180:2cm and 0.5cm) -- (-2,0) arc (180:360:2cm and 0.5cm);
\fill[top color=blue!50!,bottom color=blue!20,middle color=red!20! ,shading=axis,opacity=0.6] (0,6) circle (2cm and 0.5cm);
\draw (-2,6) -- (-2,0) arc (180:360:2cm and 0.5cm) -- (2,6) ++ (-2,0) circle (2cm and 0.5cm);
\draw[densely dashed] (-2,0) arc (180:0:2cm and 0.5cm);
\draw (-2,4) -- (-2,0) arc (180:360:2cm and 0.5cm) -- (2,4) ++ (-2,0) circle (2cm and 0.5cm);
\draw [densely dashed, thick] (-2,4) arc (180:0:2cm and 0.5cm);
\end{tikzpicture}
I managed to draw the cylinder and play around with it (color it etc) plus a circle somewhere in the cylinder but I cannot the plane z=4
in order to capture the extra circle I made. I would like also to draw to plane with the color gray!20!
. I followed some codes I found but some of them do not compile and others simply "do not do their job".
I also tried it manually but I'm having problem finding the correct coordinates. Any help?