TikZ:显示一架飞机在三维空间中移动

TikZ:显示一架飞机在三维空间中移动

我有 2 个相距一定距离的相同平面\Delta t。我想显示第一个平面被推向第二个平面的方向。

我在想也许有一些随机放置的箭头与从平面一指向平面二的平面相切。

  1. 这是可行的方法吗?
  2. 如何设置\foreach命令并指定从平面区域开始的 5 个随机箭头?也就是说,不穿过第一个平面,只是接触它并沿与平面相切的方向移动。

或者有更好的方式来展示这一点?

\documentclass[convert = false, tikz]{standalone}

\usepackage[utf8]{inputenc}
\renewcommand{\rmdefault}{ppl}
\linespread{1.05}
\usepackage[scaled]{helvet}
\usepackage{courier}
\usepackage{eulervm}
\normalfont
\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage{amsmath}
\usepackage{tikz-3dplot}

\begin{document}
\tdplotsetmaincoords{60}{130}
\begin{tikzpicture}[tdplot_main_coords]
  \coordinate (O) at (0, 0, 0);

  \draw[-latex] (O) -- (5, 0, 0) node[font = \small, pos = 1.1] {\(x\)};
  \draw[-latex] (O) -- (0, 5, 0) node[font = \small, pos = 1.1] {\(y\)};
  \draw[-latex] (O) -- (0, 0, 4) node[font = \small, pos = 1.1] {\(z\)};
  \draw[dashed] (O) -- (-3, 0, 0);

  \filldraw[blue, opacity = .6] (4, 0, 0) -- (4, 5, 0) -- (4, 5, 4) --
  (4, 0, 4) -- cycle;
  \filldraw[blue, opacity = .6] (-2, 0, 0) -- (-2, 5, 0) -- (-2, 5, 4) --
  (-2, 0, 4) -- cycle;

  \draw[latex-latex] (4, 5, 2) -- (-2, 5, 2) node[font = \small, fill = white,
  inner sep = 0, pos = .5] {\(\Delta t\)};
  \draw[|-|] (4, 2.5, 4) -- (-2, 2.5, 4) node[font = \small, fill = white,
  inner sep = 0, pos = .5] {\(v\Delta t\)};
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

我认为随意放置从一个平面指向另一个平面的箭头不太简洁,而且可能会造成混淆。为什么不直接画出速度矢量(表示平移)和一些虚线(表示两个平面保持平行)呢?

在此处输入图片描述

\documentclass[convert = false, tikz]{standalone}

\usepackage[utf8]{inputenc}
\renewcommand{\rmdefault}{ppl}
\linespread{1.05}
\usepackage[scaled]{helvet}
\usepackage{courier}
\usepackage{eulervm}
\normalfont
\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage{amsmath}
\usepackage{tikz-3dplot}

\begin{document}
\tdplotsetmaincoords{60}{130}
\begin{tikzpicture}[tdplot_main_coords]
  \coordinate (O) at (0, 0, 0);

  \draw[-latex] (O) -- (5, 0, 0) node[font = \small, pos = 1.1] {\(x\)};
  \draw[-latex] (O) -- (0, 6, 0) node[font = \small, pos = 1.1] {\(y\)};
  \draw[-latex] (O) -- (0, 0, 5) node[font = \small, pos = 1.1] {\(z\)};


  \filldraw[blue, opacity = .4]
       (-2, 0, 0)
        -- (-2, 5, 0)
        -- (-2, 5, 4)
        -- (-2, 0, 4)
        -- cycle;


  \draw[dashed,thin] (4,0,0) -- (-2,0,0);
  \draw[dashed,thin] (4,5,0) -- (-2,5,0);
  \draw[dashed,thin] (4,5,4) -- (-2,5,4);
  \draw[dashed,thin] (4,0,4) -- (-2,0,4);

  \draw[latex-,thick]
       (1, 5, 4)
        -- (-2, 5, 4) node[
                                        font = \small,
                                        fill = white,
                                        inner sep = 2pt,
                                        pos = .5,
                                    ] {\(v\)};
  \draw[|-|]
       (4, -.7, 4)
        -- (-2, -.7, 4) node[
                                            opacity=1,
                                            font = \small,
                                            fill = white,
                                            inner sep = 2pt,
                                            pos = .5,
                                        ] {\(v\Delta t\)};

  \draw[dashed,thin,gray] (4,-.7,4) -- (4,0,4);
  \draw[dashed,thin,gray] (-2,-.7,4) -- (-2,0,4);

    \filldraw[blue, opacity = .6]
       (4, 0, 0)
        -- (4, 5, 0)
        -- (4, 5, 4)
        -- (4, 0, 4)
        -- cycle;
\end{tikzpicture}
\end{document}

相关内容