In the below image, I wanted to show that some 3D shapes, like the cylinder and the sphere are constructed by rotating a planar shape around an axis.
The cylinder looks OK but the outline of the rotated semicircle looks a bit off.
I have a feeling that very little is needed to correct this error but I can't seem to find what.
The code snippet that produces the picture follows. It's an old code written when I was learning TikZ 3D and might not be the best way to achieve the result. It includes changing the basis vectors to change the default perspective but to still be able to draw the shapes using "easy" coordinates like 0, 1 etc.
Is it possible to fix the error by making as few changes as possible?
\documentclass{article}
\usepackage{tikz}
\definecolor{ocre}{RGB}{243,102,25}
\colorlet{mild}{ocre!50}
\begin{document}
\begin{tikzpicture}[y={(0,-0.385cm)},z={(0,1cm)},scale=1.25]
\fill[rotate around z=40, mild] (0,0) -- (0,0,2) -- (1,0,2) -- (1,0,0) -- cycle;
\draw (1,0) arc (0:180:1);
\draw[dashed] (-1,0) arc (180:360:1);
\draw (0,0,2) circle (1);
\draw[rotate around z=40, dashed] (1,0,0) -- (0,0) -- (0,0,2);
\draw[rotate around z=40] (0,0,2) -- (1,0,2) -- (1,0,0);
\draw (-1,0,0) -- (-1,0,2);
\draw (1,0,0) -- (1,0,2);
\draw[rotate around z=40, scale=0.8] (0,0,0.3) -- (0.3,0,0.3) -- (0.3,0,0);
\begin{scope}[xshift=3cm]
\fill[rotate around z=40, mild,y={(0,0,1)},z={(0,1,0)}] (0,0,1) -- (0,0,2) arc (90:-90:1) -- cycle;
\draw (1,0,1) arc (0:180:1);
\draw[dashed] (-1,0,1) arc (180:360:1);
\draw (0,0,1) circle[y={(0,0,1)},z={(0,1,0)}, radius=1];
\draw[dashed] (0,0) -- (0,0,2);
\end{scope}
\end{tikzpicture}
\end{document}


