Math & ScienceDrawing Right Angle Boxes

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
3LeftsAndHome
Posts: 7
Joined: Wed Mar 24, 2010 4:10 am

Drawing Right Angle Boxes

Post by 3LeftsAndHome »

I need help drawing the three right angles (the little boxes) on my altitudes and I have no clue how. Thank you, here's my code:

Code: Select all

\documentclass[10pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}[bullet/.style={coordinate,after node path={(\tikzlastnode) node {$\scriptstyle \bullet$}}}, scale = 2]
    \draw [densely dotted,black] (0,0) circle (1cm);
    \coordinate[label=below left:$A$] (A) at (-.87,-.5);
    \coordinate[label=below right:$B$] (B) at (.87,-.5);
    \coordinate[label=above:$C$] (C) at (.3,.95);
    \draw [semithick,black] (A) -- (B) -- (C) -- cycle;
    \path[name path=alta] (A) -- ($(B)!(A)!(C)$);
    \path[name path=altb] (B) -- ($(A)!(B)!(C)$);
    \draw[densely dotted, black] (C) -- ($(A)!(C)!(B)$);
       \draw[densely dotted, black] (B) -- ($(A)!(B)!(C)$);
       \draw[densely dotted, black] (A) -- ($(B)!(A)!(C)$);
       
       \fill [black,name intersections={of=alta and altb}]
      (intersection-1) circle (1pt);
      
      \draw[black] (.2,.65) node {\small $\alpha^*$};
      \draw[black] (.4,.51) node {\tiny $\beta^*$};
      \draw[black] (.22,.13) node {\small $\alpha$};
      \draw[black] (.39,.09) node {\small $\beta$};
      \draw[black] (.44,-.07) node {\small $\gamma$};
      \draw[black] (.68,-.22) node {\tiny $\gamma^*$};
      \draw[black] (.38,-.20) node {\small $\alpha$};
      \draw[black] (.62,-.42) node {\small $\alpha^*$};
      \draw[black] (.22,-.20) node {\small $\beta$};
      \draw[black] (-.47,-.43) node {\small $\beta^*$};
      \draw[black] (-.52,-.23) node {\small $\gamma^*$};
      \draw[black] (.13,-.03) node {\small $\gamma$};
\end{tikzpicture}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply