绘制旋转器

绘制旋转器

我正在尝试创建一个如下图所示的旋转器。我已经画出了圆盘,但我不知道该如何画出旋转器的杆。

旋转器的图片

我的代码:

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{intersections,arrows.meta,angles}
\usetikzlibrary{shapes.geometric}

\begin{document}
\begin{tikzpicture}
%\draw[step=1cm,gray,very thin] (-6,-6) grid (6,6);
%\foreach \x in {-4,-3,...,4}
   % \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
%\foreach \y in {-4,-3,...,4}
   % \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};

\node[below] at (0,-0.1){O};  
\draw[name path=ellipse 1] (3.5,0) arc (0:360:3.5cm and 2cm);
\draw[name path=ellipse 2,rotate=50] (3.5,0) arc (0:360:3.5cm and 2cm);
\path [name intersections={of=ellipse 1 and ellipse 2}];
\coordinate [] (A) at (intersection-4);

\draw[very thick,-{latex}](0,0)--(0,3.5);
\draw[](0,3.5)--(0,4)node[above]{Z};
\node[]() at (85:3.5){$\dot{\phi}$};
\draw[shorten >=-1cm,very thick,-{latex}](0,0)--(A);
\node[](x1) at (-65:3.5){$x$};

\draw[](0,0)--(-25:4.5)node[right]{Y};
\draw[dashed](0,0)--(-10:4.5)node[right](x2){$x^{'}$};
\draw[dashed](0,0)--(65:4.5)node[above]{$y^{'}$};
\draw[-latex](0,0)--(55:4.5)node[above]{$y$};
\draw[-latex](0,0)--(225:4.5)node[below left]{X};
\draw[-latex](0,0)--(135:4.5)node[above]{$z$};
\node[] at (135:5){$\dot{\psi}$};

%Arcs
% x to x'
%\coordinate (x1) at (-65:2);
\coordinate (O) at (0,0);
%\coordinate (x2) at (-10:2);
\draw    pic [-latex,draw,angle radius=0.7cm] {angle = x1--O--x2};    
\node[] at (0.8,-0.7){$\psi$};

% y to y'
\coordinate (y1) at (55:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (65:2);
\draw    pic [-latex,draw,angle radius=1.75cm] {angle = y1--O--y2};    

% Z to z
\coordinate (y1) at (90:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (135:2);
\draw    pic [-latex,draw,angle radius=3.0cm] {angle = y1--O--y2};    
\node[] at (-1.5,3){$\theta$};

% X to x
\coordinate (y1) at (225:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (-65:2);
\draw    pic [-latex,draw,angle radius=0.7cm] {angle = y1--O--y2};    
\node[] at (0,-1){$\phi$};

\draw[<-,rotate=-35] (0.15,3.8) arc (-60:250:3.4mm and 1.25mm);
\node[]at (50:4.25){$w_{y}$};

\draw[<-,rotate=45] (0.15,4) arc (60:-250:3.4mm and 1.25mm);
\node[]at (130:4.2){$w_{z}$};

\draw[thick,rotate around={-5:(-1,1)}] (-0.9,0.9) circle[x={(1cm,0.8cm)},y={(0cm,1cm)},x radius=0.5,y radius=0.5];

\draw[fill=white,thick,rotate around={-5:(-1,1)}] (-1,1) circle[x={(1cm,0.8cm)},y={(0cm,1cm)},x radius=0.5,y radius=0.5];

\end{tikzpicture}
\label{Plattice}
\end{document}

在此处输入图片描述

答案1

使用 tikz3d 会容易得多。

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{intersections,arrows.meta,angles}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}
%\draw[step=1cm,gray,very thin] (-6,-6) grid (6,6);
%\foreach \x in {-4,-3,...,4}
   % \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
%\foreach \y in {-4,-3,...,4}
   % \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};

\node[below] at (0,-0.1){O};  
\draw[name path=ellipse 1] (3.5,0) arc (0:360:3.5cm and 2cm);
\draw[name path=ellipse 2,rotate=50] (3.5,0) arc (0:360:3.5cm and 2cm);
\path [name intersections={of=ellipse 1 and ellipse 2}];
\coordinate [] (A) at (intersection-4);

\draw[very thick,-{latex}](0,0)--(0,3.5);
\draw[](0,3.5)--(0,4)node[above]{Z};
\node[]() at (85:3.5){$\dot{\phi}$};
\draw[shorten >=-1cm,very thick,-{latex}](0,0)--(A);
\node[](x1) at (-65:3.5){$x$};

\draw[](0,0)--(-25:4.5)node[right]{Y};
\draw[dashed](0,0)--(-10:4.5)node[right](x2){$x^{'}$};
\draw[dashed](0,0)--(65:4.5)node[above]{$y^{'}$};
\draw[-latex](0,0)--(55:4.5)node[above]{$y$};
\draw[-latex](0,0)--(225:4.5)node[below left]{X};
\draw[-latex](0,0)--(135:4.5)node[above]{$z$};
\node[] at (135:5){$\dot{\psi}$};

%Arcs
% x to x'
%\coordinate (x1) at (-65:2);
\coordinate (O) at (0,0);
%\coordinate (x2) at (-10:2);
\draw    pic [-latex,draw,angle radius=0.7cm] {angle = x1--O--x2};    
\node[] at (0.8,-0.7){$\psi$};

% y to y'
\coordinate (y1) at (55:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (65:2);
\draw    pic [-latex,draw,angle radius=1.75cm] {angle = y1--O--y2};    

% Z to z
\coordinate (y1) at (90:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (135:2);
\draw    pic [-latex,draw,angle radius=3.0cm] {angle = y1--O--y2};    
\node[] at (-1.5,3){$\theta$};

% X to x
\coordinate (y1) at (225:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (-65:2);
\draw    pic [-latex,draw,angle radius=0.7cm] {angle = y1--O--y2};    
\node[] at (0,-1){$\phi$};

\draw[<-,rotate=-35] (0.15,3.8) arc (-60:250:3.4mm and 1.25mm);
\node[]at (50:4.25){$w_{y}$};

\draw[<-,rotate=45] (0.15,4) arc (60:-250:3.4mm and 1.25mm);
\node[]at (130:4.2){$w_{z}$};

% draw spinner
\begin{scope}[every circle/.style={x={(1cm,0.8cm)},y={(0cm,1cm)}}] 
% compute offset to tangent point
\path[name path=ellipse 3,rotate around={-5:(0,0)}] (0,0) circle[x radius=0.5, y radius=.5];
\path[name path=radial 1] (0,0) -- (50:1);
\path [name intersections={of=ellipse 3 and radial 1}];
\coordinate (edge) at (intersection-1);

\draw[fill=white,thick,rotate around={-5:(-0.9,0.9)}] (-0.9,0.9) circle[x radius=0.5,y radius=0.5];
\fill[white] ($(-0.9,0.9)+(edge)$) -- ($(-1,1)+(edge)$) --
             ($(-1,1)-(edge)$) -- ($(-0.9,0.9)-(edge)$) -- cycle;% barely visible
\draw[thick] ($(-0.9,0.9)+(edge)$) -- ($(-1,1)+(edge)$)
             ($(-0.9,0.9)-(edge)$) -- ($(-1,1)-(edge)$);% barely visible
\draw[fill=white,thick,rotate around={-5:(-1,1)}] (-1,1) circle[x radius=0.5,y radius=0.5];

\coordinate (P) at (-1.5,1.5);% top of spinner
\coordinate (edge) at ($(0,0)!0.2!(edge)$);
\draw[thick,rotate around={-5:(-1,1)},] (-1,1) circle[x radius=0.1,y radius=0.1];
\fill[white] ($(P)+(edge)$) -- ($(-1,1)+(edge)$) -- ($(-1,1)-(edge)$) -- ($(P)-(edge)$) --  cycle;
\draw[thick] ($(P)+(edge)$) -- ($(-1,1)+(edge)$) ($(-1,1)-(edge)$) -- ($(P)-(edge)$);
\draw[thick,rotate around={-5:(P)},] (P) circle[x radius=0.1,y radius=0.1];
\end{scope}
\end{tikzpicture}
\label{Plattice}
\end{document}

演示

答案2

感谢约翰,我终于完成了这个图形。 在此处输入图片描述

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{intersections,arrows.meta,angles,calc}
\usetikzlibrary{shapes.geometric}

\begin{document}
\begin{tikzpicture}
%\draw[step=1cm,gray,very thin] (-6,-6) grid (6,6);
%\foreach \x in {-4,-3,...,4}
    %\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
%\foreach \y in {-4,-3,...,4}
    %\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};

\node[below] at (0,-0.1){O};  
\draw[name path=ellipse 1] (3.5,0) arc (0:360:3.5cm and 2cm);
\draw[name path=ellipse 2,rotate=50] (3.5,0) arc (0:360:3.5cm and 2cm);
\path [name intersections={of=ellipse 1 and ellipse 2}];
\coordinate [] (A) at (intersection-4);

\draw[very thick,-{latex}](0,0)--(0,3.5);
\draw[](0,3.5)--(0,4)node[above]{Z};
\node[]() at (85:3.5){$\dot{\phi}$};
\draw[shorten >=-1cm,very thick,-{latex}](0,0)--(A);
\node[](x1) at (-65:3.5){$x$};
\node[] at (-75:3){$\dot{\theta}$};

\draw[](0,0)--(-25:4.5)node[right]{Y};
\draw[dash pattern=on 3mm off 3mm](0,0)--(-10:4.5)node[right](x2){$x^{'}$};
\draw[dash pattern=on 3mm off 3mm](0,0)--(65:4.5)node[above]{$y^{'}$};
\draw[-latex,thick](0,0)--(55:4.5)node[above]{$y$};
\draw[-latex](0,0)--(225:4.5)node[below left]{X};
\draw[-latex](0,0)--(135:4.5)node[above]{$z$};
\node[above] at(130:4.5){$z'$};
\node[] at (135:5){$\dot{\psi}$};

%Arcs
% x to x'
%\coordinate (x1) at (-65:2);
\coordinate (O) at (0,0);
%\coordinate (x2) at (-10:2);
\draw    pic [-latex,draw,angle radius=0.7cm] {angle = x1--O--x2};    
\node[] at (0.8,-0.7){$\psi$};

% y to y'
\coordinate (y1) at (55:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (65:2);
\draw    pic [-latex,draw,angle radius=1.75cm] {angle = y1--O--y2};    

% Z to z
\coordinate (y1) at (90:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (135:2);
\draw    pic [-latex,draw,angle radius=3.0cm] {angle = y1--O--y2};    
\node[] at (-1.5,3){$\theta$};

% X to x
\coordinate (y1) at (225:2);
\coordinate (O) at (0,0);
\coordinate (y2) at (-65:2);
\draw    pic [-latex,draw,angle radius=0.7cm] {angle = y1--O--y2};    
\node[] at (0,-1){$\phi$};

\draw[<-,rotate=-35,thick] (0.15,3.8) arc (-60:250:3.4mm and 1.25mm);
\node[]at (50:4.25){$w_{y}$};

\draw[<-,rotate=45,thick] (0.15,4) arc (60:-250:3.4mm and 1.25mm);
\node[]at (130:4.2){$w_{z}$};

%Wx
\draw[->,thick] (-62:3) arc (-30:250:3mm and 3mm);
\node[right] at (-60:3){$w_{x}$};
%Rod of Spinner
\draw[thick,rotate=45] (0,0)--(60:0.2)|-(90:0.95);
\draw[thick,rotate=45] (0,0)--(120:0.2)|-(90:0.95);

% draw spinner
\coordinate (P) at (-1.3,1.3);% top of spinner
\begin{scope}[shift={(0.3,-0.3)}, rotate around={-5:(-1,1)},
  every circle/.style={x={(1cm,0.8cm)},y={(0cm,1cm)}}] 
% compute offset to tangent point
\path[name path=ellipse 3] (0,0) circle[x radius=0.5, y radius=.5];
\path[name path=radial 1] (0,0) -- (55:1);
\path [name intersections={of=ellipse 3 and radial 1}];
\coordinate (edge) at (intersection-1);

\draw[fill=white,thick] (-0.9,0.9) circle[x radius=0.5,y radius=0.5];
\draw[fill=white,thick] (-1,1) circle[x radius=0.5,y radius=0.5];
\draw[thick] ($(-0.9,0.9)+(edge)$) -- ($(-1,1)+(edge)$)
             ($(-0.9,0.9)-(edge)$) -- ($(-1,1)-(edge)$);% barely visible

\coordinate (edge) at ($(0,0)!0.2!(edge)$);
\draw[thick] (-1,1) circle[x radius=0.1,y radius=0.1];
\fill[white] ($(P)+(edge)$) -- ($(-1,1)+(edge)$) -- ($(-1,1)-(edge)$) -- ($(P)-(edge)$) --  cycle;
\draw[thick] ($(P)+(edge)$) -- ($(-1,1)+(edge)$) ($(-1,1)-(edge)$) -- ($(P)-(edge)$);
\draw[thick] (P) circle[x radius=0.1,y radius=0.1];
\end{scope}
\draw[thick,-latex](0,0)--(135:3);

\end{tikzpicture}
\label{Plattice}
\end{document}

相关内容