Kamis, 17 Oktober 2024

Cuboid In Latex

  1. type this following latex code in latex editor:
\documentclass{standalone}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\usepackage{mathptmx}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}

\begin{tikzpicture}
% four bottom edges (A-B-C-D)
\draw (0,0)node[left](a){\textbf{A}}--(3,0)node[right](b){\textbf{B}}--(3.5,1)node[right](c){\textbf{C}}--(1,1)node[left](d){\textbf{D}} --(0,0);
% top front horizontal edge (E - F)
\draw (0,0)--(0,2)[left]node(e){\textbf{E}}--(3,2)node[right](f){\textbf{F}}--(3,0);
% top back left edges (E - G - H)
\draw (0,2)--(1,2.5)node[above](g){\textbf{G}}--(3.5,2.5);
% right back edges (F - H - C)
\draw (3,2)--(3.5,2.5)node[right](h){\textbf{H}}--(3.5,1);
% left back vertical edge (G - D)
\draw [dashed] (1,2.5)--(1,1);
% left side horizontal edge (A - D)
\draw [dashed,white] (0,0) -- (1,1);
% bottom back side horizontal edge (D - C)
\draw [dashed,white] (1,1) -- (3.5,1);
\end{tikzpicture}

\end{document}
  1. save file as drawCuboid1sample.tex
  2. Run latex compiler command.
  3. to see the output picture, click : Kubus dan Balok >
< Previous Cube In Latex


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

Tidak ada komentar:

Posting Komentar

Various Other Posts