3

I am trying to draw two planes one above the other and a diagonal above them. Currently, I am even unable to draw the two planes one above the other. Here is what I'm doing

\begin{figure}
    \centering

    \tikz
    % plane
    \draw (0,0) -- ++ (45:2.2) -- ++ (3.3,0) -- ++ (225:2.2) -- cycle;  
    \draw (50,0) -- ++ (45:52.2) -- ++ (3.3,50) -- ++ (225:52.2) -- cycle;  
\end{figure}

If I remove the second line it works and draws a plane, but for some reason with the second line it says "command draw undefined" although it doesn't have the same problem on the first line.

Troy
  • 13,741
  • 2
    Either use { and } around the draw commands work with the tikzpicture environment. \tikz{ \draw (0,0) -- ++ (45:2.2) -- ++ (3.3,0) -- ++ (225:2.2) -- cycle; \draw (50,0) -- ++ (45:52.2) -- ++ (3.3,50) -- ++ (225:52.2) -- cycle; } The coordinates 50 and 52.2 seem also unusually large. –  May 20 '18 at 21:14

1 Answers1

1

Are you looking for something like that:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tikz}


\begin{document}
\begin{figure}
\begin{tikzpicture}
% plane
\draw (0,0) -- ++ (45:2.2) -- ++ (3.3,0) -- ++ (225:2.2) -- cycle;
\draw (0,-1) -- ++ (45:2.2)  -- ++ (3.3,0)  -- ++ (225:2.2) -- cycle;  
\end{tikzpicture}
\end{figure}
\end{document}

enter image description here

Hope that helps.

Romain

RockyRock
  • 1,221