如何绘制平面 x+z=0

如何绘制平面 x+z=0

如何绘制平面 x+z=0。

我在 x+z=0 平面上取四个点来形成一个矩形。这是正确的方法吗?

\documentclass[tikz,border=10mm]{standalone}
    \usepackage{tikz}
    \usepackage{tikz-3dplot}
    
    \begin{document}
    \tdplotsetmaincoords{60}{120} % Set the viewpoint angles
    
    \begin{tikzpicture}[scale=1.5,tdplot_main_coords]
        % Define points for the rectangle on the plane
        \coordinate (A) at (2,2,-2);
        \coordinate (B) at (2.2,-2,-2.2);
        \coordinate (C) at (-2.2,-2,2.2);
        \coordinate (D) at (-2.2,2,2.2);
        
        % Draw the rectangle
        \draw (A) -- (B) -- (C) -- (D) -- cycle;
        
        % Draw the axes
        \draw[thick,->] (0,0,0) -- (2.5,0,0) node[anchor=north east]{$x$};
        \draw[thick,->] (0,0,0) -- (0,2.5,0) node[anchor=north west]{$y$};
        \draw[thick,->] (0,0,0) -- (0,0,2.5) node[anchor=south]{$z$};
    \end{tikzpicture}
    \end{document}

相关内容