TikZ,绘制平面的三维交点

TikZ,绘制平面的三维交点

两个平面相交的第一个例子已经显示在这个答案. 我想使用 TiZ。

我已经测试过该代码,但它具有不同的轴布局(链接答案中的轴就像一个包含平面的盒子;这里所需的轴是笛卡尔轴),平面的位置不同,并且平面的填充模式也不同:我不知道如何根据我的要求进行修改。最终结果应该如下图所示,存在这些差异

  • 只有它的左边是需要考虑的(右边部分可以完全忽略);
  • 我照片里的飞机有一个垂直的交叉线(代替图片的水平交叉线);
  • 文本交线并且它的箭不是必需的。

如何实现这一点(有或没有链接答案中的代码)?

enter image description here

答案1

enter image description here

\documentclass[tikz,border=3.14pt]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords,font=\sffamily]
\draw[-latex] (0,0,0) -- (4,0,0) node[left] {$x$};
\draw[-latex] (0,0,0) -- (0,4,0) node[below] {$y$};
\draw[-latex] (0,0,0) -- (0,0,4) node[left] {$z$};
\draw[fill=red,opacity=0.2] (-3,0,-3) -- (-3,0,3) -- (3,0,3) -- (3,0,-3) -- cycle;
\draw[fill=red,opacity=0.1] (-3,-3,0) -- (-3,3,0) -- (3,3,0) -- (3,-3,0) -- cycle;
\draw[thick](-3,0,0)--(3,0,0);
\node[anchor=south west,align=center] (line) at (3,3,3) {line of\\ intersection};
\draw[-latex] (line) to[out=180,in=75] (-2,0,0.05);
\end{tikzpicture}
\begin{tikzpicture}[tdplot_main_coords,font=\sffamily]
\draw[-latex] (0,0,0) -- (4,0,0) node[left] {$x$};
\draw[-latex] (0,0,0) -- (0,4,0) node[below] {$y$};
\draw[-latex] (0,0,0) -- (0,0,4) node[left] {$z$};
\tdplotsetrotatedcoords{45}{0}{0}
\begin{scope}[tdplot_rotated_coords]
\draw[fill=red,opacity=0.2] (-3,0,-3) -- (-3,0,3) -- (3,0,3) -- (3,0,-3) -- cycle;
\end{scope}
\tdplotsetrotatedcoords{90}{45}{0}
\begin{scope}[tdplot_rotated_coords]
\draw[fill=red,opacity=0.1] (-3,-3,0) -- (-3,3,0) -- (3,3,0) -- (3,-3,0) -- cycle;
\draw[thick](-3,{3/sqrt(2)},0) coordinate(x) --(3,{-3/sqrt(2)},0);
\end{scope}
\node[anchor=south east,align=center] (line) at (3,-1.5,3.5) {line of\\ intersection};
\draw[-latex] (line) to[out=0,in=135] (x);
\end{tikzpicture}
\end{document}

相关内容