# Draw a tangent vector to the circumference path

SX](https://tex.stackexchange.com/), I'm learning Tikz's drawing and I desire to add the tangent vector in P.

## Explanation

I used the first answer to draw these radii that limit the circular path and I invoked the coordinate axes so that is superimposed on these white radii.

Then, to draw the tangent vector, I have seen using the technique for an ellipse. Could you help me to complete the drawing?

I would like to know if it is possible using this circular path and point P.

# Minimal example

\documentclass[tikz]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\def\ti{5} % Initial angle
\def\tf{85} % Final angle
\node [right] (P) at (.5*\tf+.5*\ti:\r) {$(x,y)$};
%\draw[help lines] (-\r,-\r) grid (\r,\r);
\draw[white] (0,0) -- ++(\ti:\r cm)
(0,0) -- ++(\tf:\r cm);
% Draw the arc which center is (2,1)
\draw[name path = circlepath, dashed,red] ([shift=(\ti:\r cm)]0,0) arc (\ti:\tf:\r cm);
%\draw[name intersections = {of = P and circlepath}, -latex] (P) -- ($(intersection-2)!.75cm!(intersection-1)$);
\draw[>=latex, <->] (-\r-0.5,0) -- (\r+0.5, 0) node[below] {$x$};
\draw[>=latex, <->] (0, -\r-0.5) -- (0, \r+0.5) node[left] {$y$};
\end{tikzpicture}
\end{document}


## Partial draw

I have based on these two answers, I hope this question does not qualify as a duplicate.

• If you leave 4 whitespaces at start of each line it will be marked as a code block. Alternatively you can select the code and click the {} button at the top – percusse Apr 24 '18 at 18:00

This is a standard application of the calc library. The syntax ($(P)!1.2cm!-90:(O)$) means that the point will be 1.2cm away from P at an angle -90 degree w.r.t. the path from O to P. Not that I used coordinate rather than node for P since nodes have finite size, and of course introduced a "new" coordinate O at the origin.

\documentclass[tikz]{standalone}
\usetikzlibrary{intersections,calc}
\begin{document}
\begin{tikzpicture}
\def\ti{5} % Initial angle
\def\tf{85} % Final angle
\coordinate[label=right:{$(x,y)$}] (P) at (.5*\tf+.5*\ti:\r);
\coordinate (O) at (0,0);
\draw [blue,-latex] (P) -- ($(P)!1.2cm!-90:(O)$);
%\draw[help lines] (-\r,-\r) grid (\r,\r);
\draw[white] (0,0) -- ++(\ti:\r cm)
(0,0) -- ++(\tf:\r cm);
% Draw the arc which center is (2,1)
\draw[name path = circlepath, dashed,red] ([shift=(\ti:\r cm)]0,0) arc (\ti:\tf:\r cm);
%\draw[name intersections = {of = P and circlepath}, -latex] (P) -- ($(intersection-2)!.75cm!(intersection-1)$);
\draw[>=latex, <->] (-\r-0.5,0) -- (\r+0.5, 0) node[below] {$x$};
\draw[>=latex, <->] (0, -\r-0.5) -- (0, \r+0.5) node[left] {$y$};
\end{tikzpicture}
\end{document}