I have been trying to draw this but unable to color it or create the grids.. can anyone help me?
This is my MWE:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
% Arc
\draw(0.66,1.26) arc (37:90:0.8 and 1.8);% left arc
\draw(3.3,1.3) arc (37:90:-0.8 and 1.8);% left arc
% Lines
\draw (2,3) -- (0,2);% line 1
\draw (2,3) -- (4,2);% line 2
\draw (2,2) -- (0.66,1.3);% line 3
\draw (2,2) -- (3.3,1.3);% line 4
\draw (0,2) -- (0,1.4);% line 5
\draw (0,1.4) -- (0.66,1.3);% line 6
\draw (4,2) -- (4,1.5);% line 7
\draw (4,1.5) -- (3.3,1.3);% line 8
\draw (-1.25,1.5) node {$\phi$};
\end{tikzpicture}
\end{document}
Best Answer
For this I'd recommend you
perspective
and3d
TikZ libraries. The latter allows to change the coordinate system to a 2d one situated in a plane parallel to the axes with the options (for example)In the above example we are changing the reference system to a new one situated in a plane parallel to xy plane at height z=2.
That said, it will be necessary to parametrize the intersection curve of both cylinders. They intersect at the plane y=x, so one possibility is
Last, actually answering your question, the grids can be generated with a
\foreach
loop.A complete example could be: