Sorry for the relatively easy problem. This is a computing problem that I have to solve. I have a point in 2D-space, $\vec{x}$, a (unit) vector $\vec{v}$, and some curvature $\kappa$.
What I want to do is move $\vec{x}$ a total distance of $\Delta x$, along the circle that goes through $\vec{x}$, has tangent vector $\vec{v}$ there, and has radius $1/\kappa$.
For example, if we had $\vec{x}=\begin{bmatrix}2 \\ 3\end{bmatrix}$, $\Delta x=\pi$, $\vec{v}=\begin{bmatrix}0 \\ 1\end{bmatrix}$, and $\kappa=0.5$, this corresponds to a circle with radius 2 centered at $(0, 3)$ (becuase that makes $\vec{v}$ a tangent vector to the circle at $\vec{x}$). The amount we rotate it is $\theta=\kappa\Delta x$. The result would be the point $(0, 5)$.
This is what I have so far: it is easy to calculate the normal vector $\vec{n}=\begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}\vec{v}$. Then we find the center of rotation $\vec{o}=\vec{x}+\frac{\vec{n}}{\kappa}$. Then we can just do the rotation: $\vec{x'}=\begin{bmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{bmatrix}(\vec{x}-\vec{o})+\vec{o}$.
Unfortunately, this behaves badly when $\kappa=0$ or close to 0. When $\kappa\approx 0$, I should get $\vec{x'}\approx \vec{x}+\vec{v}\Delta x$. Can someone suggest a more numerically stable solution?