Senin, 18 November 2024

Obtuse Angle In Latex 1a

  1. Type this following latex code in the latex editor:
    % !TEX TS-program=pdflatex
    % !TEX encoding=UTF-8 unicode
    % Description:
    % Obtuse Angle = Detuse Angle = Blunt Angle

    \documentclass[a4paper]{article}
    \usepackage{tikz}
    \usetikzlibrary{calc}
    \usepackage{bm}
    \usepackage[active,tightpage,tikz]{preview}
    \PreviewEnvironment{tikzpicture}
    \setlength\PreviewBorder{0.25pt}


    \begin{document}
    %Requires \usetikzlibrary{calc} in the preamble
    \boldmath
    \begin{tikzpicture}[thick]

    % draw the vertex point / vertex node

    \coordinate (B) at (2,0);

    \coordinate (A) at (0,0);

    \coordinate (C) at (-2,1.5);

    % label the vertex

    \draw [solid, thick] (B)--(A)--(C);

    \draw (A) node[below] {$A$};

    \draw (B) node[below] {$B$};

    \draw (C) node[below left] {$C$};

        % label the angle subtended at p1 by p2 and p3

        \def\angleRadius{30pt}
        % draw the arc
    % draw in Old Version Tikz/PGF   
    %    \draw[red,->,thick] let \p1=(A), \p2=(B), \p3=(C), 
    %        \n1={atan2(\x2-\x1,\y2-\y1)}, \n2={atan2(\x3-\x1,\y3-\y1)} in
    %        ($(\p1)!\angleRadius!(\p2)$) arc (\n1:\n2:\angleRadius);
    % draw in Current Version Tikz/PGF
        \draw[red,->,thick] let \p1=(A), \p2=(B), \p3=(C), 
            \n1={atan2(\y2-\y1,\x2-\x1)}, \n2={atan2(\y3-\y1,\x3-\x1)} in
            ($(\p1)!\angleRadius!(\p2)$) arc (\n1:\n2:\angleRadius);
        % draw the label
        \draw[red] let \p1=(A), \p2=(B), \p3=(C), 
             \n1={atan2(\x2-\x1,\y2-\y1)}, \n2={atan2(\x3-\x1,\y3-\y1)} in
             (\p1)+(\n1/2+\n2/2:\angleRadius) node[above right] {$\alpha$};
    \end{tikzpicture}
    \end{document}
  2. Save file as triangleEquilateral1.tex
  3. Then build or typeset the Latex code.

Output

Related Post

Tidak ada komentar:

Posting Komentar

Various Other Posts