\begin
Discover why 18 million people worldwide trust Overleaf with their work.
\begin
Discover why 18 million people worldwide trust Overleaf with their work.
\documentclass[landscape]{article}
\usepackage{tikz,amsmath, amssymb}
\usepackage[margin=1cm]{geometry}
\usetikzlibrary{calc,intersections}
\begin{document}
\begin{center}
\begin{tikzpicture}[thick]
\coordinate (A1) at (0,0);
\coordinate (A2) at ($(A1)+(90:5)$);
\coordinate (A3) at ($(A2)+(0:10)$);
\coordinate (A4) at ($(A1)+(0:10)$);
\coordinate (B1) at ($(A1)+(35:6)$);
\coordinate (B2) at ($(A2)+(35:6)$);
\coordinate (B3) at ($(A3)+(35:6)$);
\coordinate (B4) at ($(A4)+(35:6)$);
\draw[dashed] (A1) -- (B1);
\draw[dashed] (B1) -- (B2);
\path[name path=B1--B4](B1) -- (B4);
\draw[name path=uplane] (A2) -- (B2)--(B3) -- (A3)--cycle;
\draw (A1) -- (A2);
\draw (A1) -- (A4);
\draw (A2) -- (A3);
\draw (A3) -- (A4);
\draw (A4) -- (B4);
\draw (B3) -- (B4);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\node (O) at (barycentric cs:A2=1,A3=1,B3=1,B2=1) {$\bullet$};
\node (C) at (barycentric cs:A1=1,B1=1,B4=1,A4=1) {};
%%%%%%%%%%%%%%%%% cylinder %%%%%%%%%%%%%%%%%%%%
\fill[top color=gray!50!black,bottom color=gray!10,middle color=gray,shading=axis,opacity=0.25] (C) circle (2cm and 0.5cm);
\fill[left color=gray!50!black,right color=gray!50!black,middle color=gray!50,shading=axis,opacity=0.25] ($(C)+(2,0)$) -- ($(O)+(2,0)$) arc (360:180:2cm and 0.5cm) -- ($(C)+(-2,0)$) arc (180:360:2cm and 0.5cm);
\fill[top color=gray!90!,bottom color=gray!2,middle color=gray!30,shading=axis,opacity=0.25] (O) circle (2cm and 0.5cm);
\draw[top color=gray!50!black,bottom color=gray!10,middle color=gray,shading=axis,opacity=0.25] (C) circle (2cm and 0.5cm);
\draw[name path=cylinder][left color=gray!50!black,right color=gray!50!black,middle color=gray!50,shading=axis,opacity=0.25] ($(C)+(2,0)$) -- ($(O)+(2,0)$) arc (360:180:2cm and 0.5cm) -- ($(C)+(-2,0)$) arc (180:360:2cm and 0.5cm);
\draw[top color=gray!90!,bottom color=gray!2,middle color=gray!30,shading=axis,opacity=0.25] (O) circle (2cm and 0.5cm);
\draw[densely dashed] ($(C)+(-2,0)$)arc (180:0:2cm and 0.5cm);
\draw[densely dashed,gray!50!black] ($(C)+(-2,0)$)arc (180:0:2cm and 0.5cm);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw [name intersections={of=cylinder and B1--B4 ,by={K,N}}][dashed](N) --(B1)(K)--(B4);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[blue!70]
%%%%%%%%%%%%%%%%%%% vlin1 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline1][xshift=0.5 cm](0,5) --+(35:10);
\draw [name intersections={of=vline1 and uplane ,by= {E1,F1}}](E1) --(F1);
%%%%%%%%%%%%%%%%%%% vlin2 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline2][xshift=1 cm](0,5) --+(35:10);
\draw [name intersections={of=vline2 and uplane ,by= {E2,F2}}](E2) --(F2);
%%%%%%%%%%%%%%%%%%% vlin3 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline3][xshift=1.5 cm](0,5) --+(35:10);
\draw [name intersections={of=vline3 and uplane ,by= {E3,F3}}](E3) --(F3);
%%%%%%%%%%%%%%%%%%% vlin4 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline4][xshift=2 cm](0,5) --+(35:10);
\draw [name intersections={of=vline4 and uplane ,by= {E4,F4}}](E4) --(F4);
%%%%%%%%%%%%%%%%%%% vlin5 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline5][xshift=2.5 cm](0,5) --+(35:10);
\draw [name intersections={of=vline5 and uplane ,by= {E5,F5}}](E5) --(F5);
%%%%%%%%%%%%%%%%%%% vlin6 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline6][xshift=8 cm](0,5) --+(35:10);
\draw [name intersections={of=vline6 and uplane ,by= {E6,F6}}](E6) --(F6);
%%%%%%%%%%%%%%%%%%% vlin7 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline7][xshift=8.5 cm](0,5) --+(35:10);
\draw [name intersections={of=vline7 and uplane ,by= {E7,F7}}](E7) --(F7);
%%%%%%%%%%%%%%%%%%% vlin8 %%%%%%%%%%%%%%%%%%%%%
\path[name path=vline8][xshift=9 cm](0,5) --+(35:10);
\draw [name intersections={of=vline8 and uplane ,by= {E8,F8}}](E8) --(F8);
%%%%%%%%%%%%%%%%%%% hlin1 %%%%%%%%%%%%%%%%%%%%%
\path[name path=hline1][yshift=0.3 cm](0,5) --+(0:15);
\draw [name intersections={of=hline1 and uplane ,by= {X1,Y1}}](X1) --(Y1);
%%%%%%%%%%%%%%%%%%% hlin2 %%%%%%%%%%%%%%%%%%%%%
\path[name path=hline2][yshift=0.6 cm](0,5) --+(0:15);
\draw [name intersections={of=hline2 and uplane ,by= {X2,Y2}}](X2) --(Y2);
%%%%%%%%%%%%%%%%%%% hlin3 %%%%%%%%%%%%%%%%%%%%%
\path[name path=hline3][yshift=0.9 cm](0,5) --+(0:15);
\draw [name intersections={of=hline3 and uplane ,by= {X3,Y3}}](X3) --(Y3);
%%%%%%%%%%%%%%%%%%% hlin4 %%%%%%%%%%%%%%%%%%%%%
\path[name path=hline4][yshift=2.5 cm](0,5) --+(0:15);
\draw [name intersections={of=hline4 and uplane ,by= {X4,Y4}}](X4) --(Y4);
%%%%%%%%%%%%%%%%%%% hlin5 %%%%%%%%%%%%%%%%%%%%%
\path[name path=hline5][yshift=2.8 cm](0,5) --+(0:15);
\draw [name intersections={of=hline5 and uplane ,by= {X5,Y5}}](X5) --(Y5);
%%%%%%%%%%%%%%%%%%% hlin6 %%%%%%%%%%%%%%%%%%%%%
\path[name path=hline6][yshift=3.1 cm](0,5) --+(0:15);
\draw [name intersections={of=hline6 and uplane ,by= {X6,Y6}}](X6) --(Y6);
\end{scope}
%%%%%%%%%%%%%%%%%%% axis %%%%%%%%%%%%%%%%%%%%%
\begin{scope}[red,-stealth]
\draw(A2) --+ (35:8);
\draw(A2) --+ (0:12);
\draw(A2) --+ (90:4);
\end{scope}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{scope}[<-,line width=1mm,magenta]
\draw ($(O)+(-.5,0.2)$)--+(90:4);
\draw ($(O)+(0,0.2)$)--+(90:4);
\draw($(O)+(.5,0.2)$)--+(90:4);
\end{scope}
\foreach \i in {1,2,3,4,5,6}
{
\fill (X\i)circle(2pt);
}
\foreach \i in {1,2,...,8}
{
\fill (F\i)circle(2pt);
}
\foreach \i/\x in {1/2,2/3,3/4,4/5,5/6}
{
\node[below] at (F\i){\footnotesize $x_\x$};
}
\foreach \i/\x in {1/2,2/3,3/4}
{
\node[left] at (X\i){\footnotesize $y_\x$};
}
\fill (B2)circle(2pt);
\fill (A2)circle(2pt)node[below left]{\footnotesize $y_1=x_1$};
\fill (A3) circle(2pt)node[below left]{\footnotesize $x_p$};
\fill (B2) circle(2pt)node[left]{\footnotesize $y_q$};
\end{tikzpicture}
\end{center}
\end{document}