0

How to plot the plane x+z=0.

I took four points on x+z=0 plane to form a rectangle. Is this a correct approach?

\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}

math131
  • 149

0 Answers0