4

I draw a Bezier curve and get points at 0.2,0.4 etc position. I want to draw a vector from one of the points. But the vector doesn't originated from the point. There is some gap between the point and the vector. How can I fix it?

\documentclass{report}

\usepackage{tikz}
\usetikzlibrary{arrows,shapes.geometric}

\begin{document}

\begin{tikzpicture}
\draw[very thin,black!50, step=0.5] (-1,-1) grid (6,6);
\draw[->,>=stealth',very thick] (-1,0)--(6,0);
\draw[->,>=stealth',very thick] (0,-1)--(0,6);
\draw (0,0) .. controls (1,1) and (-5,1) .. (6,6)
\foreach \p/\l in {0.2/A,0.4/B,0.6/C,0.8/D} {node[pos=\p,label=$\l$,anchor=base](\l) {}};
\foreach \l in {A,B,C,D} {\draw[fill] (\l) circle (2pt);}
\draw[red, thick, ->, >=stealth'] (C) -- +(2,1) node[right] {$\vec F_C$};
\end{tikzpicture}

\end{document}

enter image description here

1 Answers1

3

You can define the anchor of the first arrow point to C.center. Is that what you mean? See pgfmanual section 17.5 Positioning Nodes

\documentclass{report}

\usepackage{tikz}
\usetikzlibrary{arrows,shapes.geometric}

\begin{document}

\begin{tikzpicture}
\draw[very thin,black!50, step=0.5] (-1,-1) grid (6,6);
\draw[->,>=stealth',very thick] (-1,0)--(6,0);
\draw[->,>=stealth',very thick] (0,-1)--(0,6);
\draw (0,0) .. controls (1,1) and (-5,1) .. (6,6)
\foreach \p/\l in {0.2/A,0.4/B,0.6/C,0.8/D}     {node[pos=\p,label=$\l$,anchor=base](\l) {}};
\foreach \l in {A,B,C,D} {\draw[fill] (\l) circle (2pt);}
\draw[red, thick, ->, >=stealth'] (C.center) -- +(2,1) node[right] {$\vec F_C$};
\end{tikzpicture}

\end{document}

Result

raedma
  • 1,794