[Tex/LaTex] Drawing a circular arc between two rays

tikz-pgf

I have two rays drawn with a common endpoint at A. I mark a point 3/7 of the way from A to the end of one of the rays, and label it P. I want to draw a circular arc centered at A through P between the rays.

\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}

\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}


\usepackage{pgfplots}
\pgfplotsset{compat=1.11}


\begin{document}


\begin{tikzpicture}

%Three points are labeled in the Cartesian plane.
\coordinate (A) at (0,0);
\coordinate (B) at (75:3);
\coordinate (C) at ($(B) +(5,0)$);

%Two rays are drawn
\draw[name path=path_AB, -latex] (A) -- (B);
\draw[name path=path_AC, -latex] (A) -- (C);

%The four vertices are labeled.
\node at ($(A)! -2.5mm! (C)$){$A$};
\node at ($(B)! -2.5mm! (A)$){$k$};
\node at ($(C)! -2.5mm! (A)$){$\ell$};

%The circular arc centered at A starts at P.
\coordinate (P) at ($(A)!3/7!(B)$);
\draw[fill] (B') circle (1.5pt);


%An arc between the rays starting at P.

\end{tikzpicture}

\end{document}

Best Answer

Updated

Since you already defined P, you can calculate the length that goes from A to it and then use the updated version of the command you see in the old solution:

%An arc between the rays starting at P.
\pgfmathsetlengthmacro{\radius}{(3/7)*3cm}
\draw (P) arc (80:30:\radius) node[pos=0,left] {$P$};

figure 1

Old solution

If you don't have a point already, as in your case, you can just add this to your code:

\draw ++(75:1) arc (75:27:1) node[pos=0,left] {$P$};

which does:

  • Start from (0,0) (the A coordinate) and move 1 in the direction of the 75 angle
  • From there, draw an arc that goes from the angle 75 to the angle 27.1 is the radius.
  • Finally, add a node P at the start of the arc, on the left.

figure 2

Some explanations

Is the part ++(75:1) compiled the same as (0,0) ++(75:1)?

Yes, it's the same thing.

Why do you have 27 in (75:27:1)?

75 is the starting angle, while 27 is the end angle. These angles are not the angle at which the path exits or enters, here's an image to show what I mean:

figure 3