Rabu, 12 Maret 2025

Cone In Latex

1. Type this following latex code for drawing Cone shape using Latex:

% !TEX-ts=pdflatex

% pdflatex cone1a.tex

% Distributed under the LaTeX Project Public License

% https://www.latex-project.org/lppl.txt

%\documentclass{standalone}


\documentclass{article}

\usepackage{tikz}

\usetikzlibrary{calc}

\usepackage{mathpazo}

\usepackage[active,multi,tightpage,varwidth,pdflatex]{preview}


\PreviewEnvironment[{[]}]{tikzpicture}

\setlength\PreviewBorder{3pt}


\begin{document}

\begin{tikzpicture}

%% draw arc for a back curve base

\draw[dashed](0,0) arc (170:10:2cm and 0.4cm) coordinate[pos=0] (a);


%% draw arc for a front curve base

\draw[thick] (0,0) arc(-170:-10:2cm and 0.4cm) coordinate (b);

%% draw height , radius

\draw[densely dashed] ([yshift=4cm]$(a)!0.5!(b)$) -- node[right,font=\footnotesize] {$\mathbf{h}$} coordinate[pos=0.95] (aa)($(a)!0.5!(b)$) -- node[above,font=\footnotesize,xshift=-0.1cm,yshift=-0.05cm]{$\mathbf{r}$} coordinate[pos=0.1] (bb) (b);


%% draw angle between height and radius

\draw[thick] (aa) -| (bb);

%% draw slant height or curve side

\draw[thick] (a) -- ([yshift=4cm]$(a)!0.5!(b)$) -- (b);

\end{tikzpicture}

\end{document}

2. Save file as cone1a.tex.

3.Then build or typeset the Latex code.


Output

To see the output, look at the below picture:





Notes

  • To see the more clear picture, click on the picture.
  • Maybe you need a little bit high computer requirement to learn from above lesson list.


<< Back to Study About Draw In Latex


Related Post

Learning Latex RoadMap


Tidak ada komentar:

Posting Komentar

Various Other Posts