Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. documentclass[12pt]{article}
  2. usepackage{amsmath}
  3. usepackage{tikz}
  4. usepackage{pgfplots}
  5. usetikzlibrary{calc,3d,decorations.markings, backgrounds, positioning,intersections,shapes}
  6. %usepackage{tikz-3dplot}
  7.  
  8. begin{document}
  9.  
  10. begin{figure}[ht]
  11. begin{center}
  12.  
  13. %tdplotsetmaincoords{60}{145}
  14. begin{tikzpicture}[scale=2]
  15.  
  16. coordinate (O) at (0,0,0);
  17.  
  18. coordinate (A) at (1,-1,1);
  19. coordinate (B) at (-1,-1,1);
  20. coordinate (C) at (-1,1,1);
  21. coordinate (D) at (1,1,1);
  22. coordinate (E) at (1,1,-1);
  23. coordinate (F) at (-1,1,-1);
  24. coordinate (G) at (-1,-1,-1);
  25. coordinate (H) at (1,-1,-1);
  26.  
  27. draw[fill=black] (A) circle (1pt) node[anchor=west] {$A$};
  28. draw[fill=black] (B) circle (1pt) node[anchor=east] {$B$};
  29. draw[fill=black] (C) circle (1pt) node[anchor=east] {$C$};
  30. draw[fill=black] (D) circle (1pt) node[anchor=west] {$D$};
  31. draw[fill=black] (E) circle (1pt) node[anchor=west] {$E$};
  32. draw[fill=black] (F) circle (1pt) node[anchor=east] {$F$};
  33. draw[fill=black] (G) circle (1pt) node[anchor=west] {$G$};
  34. draw[fill=black] (H) circle (1pt) node[anchor=east] {$H$};
  35. draw[fill=blue] (O) circle (1pt) node[anchor=east] {$0$};
  36.  
  37. coordinate (X) at (3,0,0);
  38. coordinate (Y) at (0,3,0);
  39. coordinate (Z) at (0,0,3);
  40.  
  41.  
  42. draw[opacity=0.2] (A)--(B)--(C)--(D)--cycle;
  43. draw[opacity=0.2] (E)--(F)--(G)--(H)--cycle;
  44. draw[opacity=0.2] (A)--(H);
  45. draw[opacity=0.2] (B)--(G);
  46. draw[opacity=0.2] (D)--(E);
  47. draw[opacity=0.2] (C)--(F);
  48.  
  49.  
  50.  
  51. draw[-latex] (O) -- (X) node[anchor=west] {; ; $X$};
  52. draw[-latex] (O) -- (Y) node[anchor=south] {$Y$};
  53. draw[-latex] (O) -- (Z) node[anchor=south] {$Z$};
  54.  
  55.  
  56.  
  57. end{tikzpicture}
  58. end{center}
  59. end{figure}
  60.  
  61. end{document}
  62.  
  63. documentclass[12pt]{standalone}
  64. usepackage{tikz}
  65. begin{document}
  66. begin{tikzpicture}[scale=2,z={(-.5,-.28)}]
  67.  
  68. draw[latex-] (2.1,0,0) coordinate (X) node[anchor=west] {$X$} -- ([scale=-1]X);
  69. draw[latex-] (0,2.1,0) coordinate (Y) node[anchor=south] {$Y$} -- ([scale=-1]Y);
  70. draw[latex-] (0,0,3.5) coordinate (Z) node[anchor=east] {$Z$} -- ([scale=-1]Z);
  71.  
  72. draw[fill=blue] coordinate (O) circle (1pt) node[anchor=south east] {$O$};
  73.  
  74. draw[opacity=0.2]
  75. (1,-1,1) coordinate (A) --
  76. (-1,-1,1) coordinate (B) --
  77. (-1,1,1) coordinate (C) --
  78. (1,1,1) coordinate (D) -- cycle
  79. (1,1,-1) coordinate (E) --
  80. (-1,1,-1) coordinate (F) --
  81. (-1,-1,-1) coordinate (G) --
  82. (1,-1,-1) coordinate (H) -- cycle
  83. (A)--(H) (B)--(G) (D)--(E) (C)--(F);
  84.  
  85. foreach l/a in {A/north west,B/north east,C/south east,D/south east,E/south west,F/south east,G/north west,H/north west}
  86. draw[fill=black] (l) circle (1pt) node[anchor=a] {$l$};
  87. end{tikzpicture}
  88. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement