-2

i whant help with drowing cylinder in 3d with dots(p1,p2,...pn) on both side cylinder

  • Welcome to TeX.SX! Aren't you this user as well? The calligraphy is very similar and the first name is the same. – Phelype Oleinik Apr 20 '19 at 1:27
  • yes i am. i need to get this job done in 3 hours so i made another account becouse fist one was banned for 24 hours – levan Apr 20 '19 at 1:30
  • If it was banned it's because you are not using this site as it's meant to be used. This is not a “do my assignment for me” service. We usually relax the rules for new users but you should learn from the answers you get, not keep posting pictures and asking people to do it for you. And trying to do it 3 hours before the deadline is a terrible idea. (It doesn't look like you were banned, though). – Phelype Oleinik Apr 20 '19 at 1:35
  • 3
    The problem is not the title, is that you are showing no effort and leaving all the work for other people. Now that you got answers to your questions the least you can do is show your appreciation by upvoting and accepting those answers. This post shows how you do that: tex.meta.stackexchange.com/q/1852 – Phelype Oleinik Apr 20 '19 at 1:52
  • 1
    @levan But you can still mark them as accepted. – Phelype Oleinik Apr 20 '19 at 1:57
3
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d}
\begin{document}
\tdplotsetmaincoords{105}{-30}
\begin{tikzpicture}[tdplot_main_coords,bullet/.style={circle,fill,inner sep=2pt}]
 \pgfmathsetmacro{\Radius}{1.5}
 \pgfmathsetmacro{\Height}{4}
 \draw[-stealth] (0,0,0) coordinate (O) -- (2.5*\Radius,0,0) node[pos=1.05] {$x$};
 \draw[-stealth] (O) -- (0,2.5*\Radius,0) node[pos=1.05] {$y$};
 \draw[-stealth] (O) -- (0,0,1.25*\Height) node[pos=1.05] {$x$};
 \draw[dashed] plot[variable=\x,domain=\tdplotmainphi:\tdplotmainphi-180,smooth]
    ({\Radius+\Radius*cos(\x)},{\Radius*sin(\x)},0);
 \begin{scope}[canvas is xy plane at z=0]   
  \foreach \X [count=\Y] in {-2/3,-1/3,2/3}
  {\node[bullet,transform shape] (B-\Y) at (\Radius+\Radius*\X,0){};}
  \foreach \Y in {1,2,3}
  {\node[anchor=south] at (B-\Y){\ifnum\Y=3
  $P_n$
  \else
  $P_\Y$
  \fi};}
 \end{scope}
 \draw[left color=gray,right color=gray!80,middle color=gray!20,fill opacity=0.5]
  plot[variable=\x,domain=\tdplotmainphi:\tdplotmainphi+180,smooth]
   ({\Radius+\Radius*cos(\x)},{\Radius*sin(\x)},0)
   -- plot[variable=\x,domain=\tdplotmainphi+180:\tdplotmainphi,smooth]
   ({\Radius+\Radius*cos(\x)},{\Radius*sin(\x)},\Height) -- cycle;
 \begin{scope}[canvas is xy plane at z=\Height] 
  \fill[gray!30] (\Radius,0) circle[radius=\Radius];
  \foreach \X [count=\Y] in {-2/3,-1/3,2/3}
  {\node[bullet,transform shape] (T-\Y) at (\Radius+\Radius*\X,0){};}
  \foreach \Y in {1,2,3}
  {\node[anchor=south] at (T-\Y){\ifnum\Y=3
  $P_n$
  \else
  $P_\Y$
  \fi};}
 \end{scope}
\end{tikzpicture} 
\end{document} 

enter image description here

  • iits not my code i find code on this site and i did not khnow that it was needed i will try to ask better questions. sorry again. – levan Apr 20 '19 at 1:48
  • thank u marmot i will mention u when i solve knot recognition problem – levan Apr 20 '19 at 2:05
  • @levan No need to mention and I removed the comments in my answer since you seem to have read them. – user121799 Apr 20 '19 at 2:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.