4

I'm learning how to draw with tikz and trying to draw an angle. I know how to draw an arc with \draw (0,0) circle (start, end, radius); but with an arbitrary angle from two lines, this is too complicated (require many calculations). So I went for an easier way in this question. My problem is the arc now protrudes out from its sides. How can I fix this? Also, is there any other simple way to draw an arc from two lines.

Here is my code. I hope it isn't too messy.

\documentclass[a4paper]{article}
\usepackage[top=1cm, bottom=1cm, left=2cm, right=1cm]{geometry}
\usepackage{tikz,calc}
\usetikzlibrary{angles}

\begin{document}
    \begin{tikzpicture}
    \draw [help lines] (0,0) grid (6,3);
    \draw[thick] (0,0)--(1.5,2)--(6,2)--(4.5,0)--cycle;
    \draw[thick,->] (2,1)node[left](A){A}--(4,0.5)node[right](B){B};
    \draw[thick,->] (2,1)--(3.5,1.5)node[right](C){C};

    %angle
    \pic [draw, angle radius=6mm, angle eccentricity=1.5] {angle = B--A--C};
    \end{tikzpicture}
\end{document}

enter image description here

1 Answer 1

6

You have to define the angle with coordinates and not with nodes. Coordinates are just points, while nodes have some size which is considered drawing the arc.

\documentclass[a4paper]{article}
\usepackage[top=1cm, bottom=1cm, left=2cm, right=1cm]{geometry}
\usepackage{tikz,calc}
\usetikzlibrary{angles}

\begin{document}
    \begin{tikzpicture}
    \draw [help lines] (0,0) grid (6,3);
    \draw[thick] (0,0)--(1.5,2)--(6,2)--(4.5,0)--cycle;
    \draw[thick,->] (2,1) coordinate[label=left:A] (A) --(4,0.5) coordinate[label=right:B] (B);
    \draw[thick,->] (2,1)--(3.5,1.5) coordinate[label=right:C](C);

    %angle
    \pic [draw, angle radius=6mm, angle eccentricity=1.5] {angle = B--A--C};
    \end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .