在 tikz 中绘制顶部

在 tikz 中绘制顶部

我想画一个顶部来展示陀螺效应在我的技术报告中,如下图所示: 想要绘制的图像

顶部可以简化为圆锥体......有人可以给我一些建议吗?谢谢您的回复......


我按照代码马洛特 土拨鼠,但它显示了圆圈的顶部比率 =1在此处输入图片描述

我该如何修复该错误?

答案1

欢迎使用 TeX-SE!这也许能给你一个开始。(我不太擅长从屏幕截图中输入内容,所以我就这么算了。)

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d}
\definecolor{myc}{RGB}{151, 186, 204}
\begin{document}

\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,>=stealth]
\draw[->] (0,0,0) coordinate (O) -- ++ (5,0,0) node[anchor=north east]{$x$};
\draw[->] (O) -- ++(0,5,0) node[anchor=north west]{$y$};
\draw[->] (O) -- ++(0,0,5) node[anchor=south]{$z$};
 \begin{scope}[canvas is xy plane at z=4.9]
  \draw[dashed] circle [radius=1.5cm];
  \draw[dashed] (0,0) -- (60:1.5);
  \pgflowlevelsynccm
  \draw[very thick,orange,->] (0,0) -- (40:1.5);
  \draw[very thick,orange,->] (40:1.5) arc (40:60:1.5);
 \end{scope}

 \tdplotsetrotatedcoords{40}{15}{0}
 \begin{scope}[tdplot_rotated_coords]
  \pgfmathsetmacro{\R}{2}
%   \draw[->,dashed]  (O) -- ++ (5,0,0) node[anchor=north east]{$x'$};
%   \draw[->,dashed]  (O) -- ++(0,5,0) node[anchor=north west]{$y'$};
%   \draw[->,dashed]  (O) -- ++(0,0,5) node[anchor=south]{$z'$};
  \draw[very thick,orange] (O) -- (0,0,3);
  \draw[left color=myc,right color=myc,middle color=myc!60,fill opacity=0.5] 
  plot[variable=\x,domain=-110:70,smooth]
  ({\R*cos(\x)},{\R*sin(\x)},{3}) to[out=-80,in=75] (O)
  to[out=95,in=-100] cycle;
  \begin{scope}[canvas is xy plane at z=3]
  \draw[fill=myc,fill opacity=0.5] circle [radius=\R*1cm];
  \pgflowlevelsynccm
  \draw[very thick,green!70!black,->] (-180:\R/2) arc (-180:100:\R/2);
 \end{scope}

  \draw[very thick,orange,->] (0,0,3) -- (0,0,5);
 \end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容