[Tex/LaTex] TikZ, draw a 3D intersection of planes

3dtikz-3dplottikz-pgf

A first example of intersection between two planes is already shown in this answer. I would like to use TikZ.

I already tested that code, but it has a different axes layout (the axes in the linked answer are like a box containing the planes; the required axes here are instead the cartesian ones), a different position of the planes and a different fill pattern for the planes: I don't know how to modify it according to my requirements. The final result should be like the following image, with these differences:

  • only its left part is to be considered (the right part can be completely ignored);
  • the planes in my picture have a vertical intersection line (instead of the horizontal intersection line of the picture);
  • the text line of intersection and its arrow are not necessary.

How to accomplish this (with or without the code in the linked answer)?

enter image description here

Best Answer

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}
Related Question