![Result](https://i.stack.imgur.com/mZ7kZ.png)
Using calc
library and the operators let
and in
you can compute the radius, initial angle and final angle for the arc
from the three points you have (center and two circle points), and use then the computed numbers as part of the path. The following MWE shows how:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\thispagestyle{empty}
\usetikzlibrary{calc}
\begin{tikzpicture}
\coordinate (center) at (3,3);
\coordinate (1) at (0,0);
\coordinate (2) at (5, .5);
\coordinate (3) at ($(center) +(30:2)$);
\coordinate (4) at ($(center) +(70:2)$);
\coordinate (5) at (0,6);
\draw[blue, dotted]
let \p1 = ($(3)-(center)$),
\n0 = {veclen(\x1,\y1)}
in (center) circle(\n0);
\filldraw[draw=black, fill=green, fill opacity=0.3]
let \p1 = ($(3) - (center)$),
\p2 = ($(4) - (center)$),
\n0 = {veclen(\x1,\y1)}, % Radius
\n1 = {atan(\y1/\x1)+180*(\x1<0)}, % initial angle
\n2 = {atan(\y2/\x2)+180*(\x2<0)} % Final angle
in
(1) -- (2) -- (3) arc(\n1:\n2:\n0) -- (5) -- cycle;
\foreach \dot in {1,2,3,4,5,center} {
\fill (\dot) circle(2pt);
\node[above] at (\dot) {\dot};
}
\end{tikzpicture}
\end{document}
If you have v2.10 of pgf/tikz, you can calculate the initial and final angles using atan2(x,y)
instead of the above expression, (thanks to qrrbrbirlbel for suggesting it), i.e:
\n1 = {atan2(\x1,\y1)}, % initial angle
\n2 = {atan2(\x2,\y2)} % Final angle
pgfplots
offers something on these lines. An example from the manual:
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines=none]
\addplot[mesh,samples=1000,domain=-4*pi:4*pi,line width=2pt] {sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{document}
![enter image description here](https://i.stack.imgur.com/wZ0d6.jpg)
Best Answer
There are many possibilities to realize this. I implemented a center coordinate, which is a bit more flexible. Explanations as comments: