我已经尝试过这个代码:
\begin{figure}
\begin{tikzpicture}[scale=0.35]
\draw[fill=white] (120.7542:9.9) node (b1) {} (110.1972:11) node (b2) {};
\path (b1) -- (b2) node[] (x2) {};
\draw[fill=white] (267.0380:3.9) node (c1) {} (145:4.4) node (c2) {};
\path (c1) -- (c2) node[] (x3) {};
\draw[fill=white] (327.0380:3.9) node (d1) {} (340:13.4) node (d2) {};
\path (d1) -- (d2) node[] (x4) {};
\draw[fill=white] (10:3.9) node (e1) {} (20:13.4) node (e2) {};
\path (e1) -- (e2) node[] (x5) {};
\draw[fill=white] (10:3.9) node (f1) {} (270:13.4) node (f2) {};
\path (f1) -- (f2) node[] (x6) {};
\draw[fill=white] (10:3.9) node (h1) {} (90:13.4) node (h2) {};
\path (h1) -- (h2) node[] (x8) {};
\draw[-{Latex[length=2mm]}] (0,0) -- (x4) node[pos=1.1,fill=white,circle]{$e_{y}$};
\draw[-{Latex[length=2mm]}] (0,0) -- (x5) node[pos=1.1,fill=white,circle]{$e_{x}$};
\draw[-{Latex[length=2mm]}] (0,0) -- (x6) node[pos=1.1,fill=white,circle]{$e_{z}$};
\draw[-{Latex[length=2mm]}] (0,0) -- (x8) node[pos=1.1,fill=white,circle]{};
\draw (-4.685,-2.2) -- ++(0,10);
\draw (4.685,-2.2) -- ++(0,10);
\draw[-{Latex[length=2mm]}] (-0.9,8.65) arc (100:-120:2.9 and 0.9) node[anchor=north east,pos=1.0,label={$\dot{q}_{0}$}] {};
\draw (0,7.8) ellipse (4.685cm and 1.75cm);
\draw (-4.685,-2.2) arc (180:360:4.685 and 1.75);
\end{tikzpicture}
\end{figure}
有任何 tikz 代码可以生成它吗?
答案1
图表的某些部分是可识别的,有些部分对我来说似乎没有意义。所以我专注于我认为能够识别的部分。要添加其他内容,您可能还需要patterns
加载decorations.pathmorphing
。
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d,intersections,bending}
\begin{document}
\tdplotsetmaincoords{60}{30}
\begin{tikzpicture}[tdplot_main_coords,>=stealth]
\begin{scope}[canvas is xy plane at z=-0.2,transform shape]
\draw[very thick,scale=2,name path global=lower] plot[smooth cycle] coordinates {(-2,1) (-1.5,-1) (-1,-1)
(0,-1.5) (1.5,-1) (2,-1.2) (2.1,-1.2) (0.65,1) (-0.5,0.6)};
\end{scope}
\begin{scope}[canvas is xy plane at z=0,transform shape]
\draw[very thick,scale=2,fill=white] plot[smooth cycle] coordinates {(-2,1) (-1.5,-1) (-1,-1)
(0,-1.5) (1.5,-1) (2,-1.2) (2.1,-1.2) (0.65,1) (-0.5,0.6)};
\draw[thick,name path global=cylo] (180+\tdplotmainphi:1) coordinate (BL)
arc(180+\tdplotmainphi:360+\tdplotmainphi:1) coordinate (BR);
\end{scope}
\begin{scope}[canvas is xy plane at z=1,transform shape]
\draw[thick,name path global=cyl] (BL) -- (180+\tdplotmainphi:1) coordinate (TL)
arc(180+\tdplotmainphi:360+\tdplotmainphi:1) coordinate (TR) -- (BR);
\draw[thick,fill=white,name path global=cylt] (0,0) coordinate (T) circle[radius=1];
\draw[thick,->] (130:0.5) arc(130:-100:0.5) node[left,transform shape=false]{$q_0$};
\end{scope}
\path[name path=z axis] (0,0,2) coordinate (ZT) -- (0,0,-4) coordinate (ZB);
\draw[dashed,thick,name intersections={of=z axis and lower,by=iz}] (T) -- (iz);
\draw[thick,->] (T) -- (ZT);
\draw[thick,->] (iz) -- (ZB) node[right]{$e_z$};
\path[name path=x axis] (0,0,0) coordinate (O) -- (3,0,0);
\path[name path=y axis] (O) coordinate (O) -- (0,3,0);
\draw[dashed,thick,name intersections={of=x axis and cylo,by=ix}] (O) -- (ix);
\draw[dashed,thick,name intersections={of=y axis and cylt,by=iy}] (O) -- (iy);
\draw[thick,->] (ix) -- (3,0,0) node[right]{$e_x$};
\draw[thick,->] (iy) -- (0,3,0) node[right]{$e_y$};
\end{tikzpicture}
\end{document}