- type this following latex code in latex editor:
%!TEX TS-program = pdflatex
%!TEX encoding = UTF-8 Unicode
%Typeset/Build program\usepackage{tikz,tikz-3dplot}
\usepackage{mathptmx}
\usepackage{amsfonts}
\begin{document}
\tdplotsetmaincoords{70}{120}
\begin{tikzpicture}[tdplot_main_coords,line cap=butt,line join=round,c/.style={circle,fill,inner sep=1pt},
declare function={a=2;}]
\path
(a,-a,-a) coordinate (A)
(a,a,-a) coordinate (B)
(-a,a,-a) coordinate (C)
(-a,-a,-a) coordinate (D)
(a,-a,a) coordinate (E)
(a,a,a) coordinate (F)
(-a,a,a) coordinate (G)
(-a,-a,a) coordinate (H)
(0,0,0) coordinate (O)
;
\draw[thick,dashed] (D) -- (H) (D) -- (A) (D) -- (C);
\draw[thick] (H) -- (E) -- (F) -- (G) -- cycle (A) -- (E) (B) -- (F) (C) -- (G) (A) -- (B) -- (C);
\path foreach \p/\g in {A/-90,B/-90,C/-90,D/-90,E/90,F/90,G/90,H/90}{(\p)node[c]{}+(\g:2.5mm) node{$\mathbf{\p}$}};
\end{tikzpicture}
\end{document}
- save file as drawCube7sample.tex
- Run latex compiler command.
- to see the output picture, click : Kubus dan Balok >
Next click Cuboid In Latex >
<< Back to Study About Draw In Latex 2
latex equation, latex formula, tex math and science document sample, latex math and science document example, latex draw, drawing in latex, latex graphic, mathematics, science
Related Post
Circle Theorem Using Latex 1 ( latex equation )
Tidak ada komentar:
Posting Komentar