polygon-order.tex 879 B

1234567891011121314151617181920212223242526
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{shapes.geometric,positioning,calc}
  4. \newcommand{\room} {
  5. \coordinate[label=left:$A$] (A) at (1,0);
  6. \coordinate[label=right:$B$] (B) at (3,0);
  7. \coordinate[label=right:$C$] (C) at (4,2);
  8. \coordinate[label=above:$D$] (D) at (3,4);
  9. \coordinate[label={[label distance=0.5cm]90:$E$}] (E) at (2,2);
  10. \coordinate[label=above:$F$] (F) at (1,4);
  11. \coordinate[label=left:$G$] (G) at (0,2);
  12. }
  13. \begin{document}
  14. \tikzstyle{polygon}=[very thick, fill=orange!25]
  15. \begin{tikzpicture}
  16. \room;
  17. \draw[polygon] (A) -- (B) -- (C) -- (D) -- (E) -- (F) -- (G) -- cycle;
  18. \begin{scope}[xshift=5.5cm]
  19. \room;
  20. \draw[polygon] (A) -- (B) -- (C) -- (D) -- (F) -- (E) -- (G) -- cycle;
  21. \end{scope}
  22. \end{tikzpicture}
  23. \end{document}