Using the notation of the figure you have linked to, we have

\begin{equation}
R \sin \frac{\theta}{2} = \frac{a}{2}
\end{equation}

we can also write

\begin{equation}
\theta = \frac{s}{R} = \frac{2 s \sin \theta/2}{a}
\end{equation}

From this equation, you can solve for $\theta$.

Once you have solved for $\theta$, you have

\begin{equation}
h = R - R \cos(\theta/2)
\end{equation}

Since $R = a/(2 \sin \theta/2)$, we have

\begin{equation}
h = \frac{a}{2 \sin \theta/2} \left( 1 - \cos\left(\frac{s \sin\theta/2}{a}\right)\right)
\end{equation}

Welcome to Math.SE! Here is my sketch for the case of clockwise direction: initial point is $A$, the endpoint you want is $B$, and $C$ is the radius of the circle on which the arc lies.

I will use polar angles: you can see the description in Wikipedia. The formulas for conversion from polar to Cartesian (on the same wiki article) will also be used.

On the picture, $\theta$ is the polar angle of the direction in which the curve departs from point $A$. Since any radius of a circle is perpendicular to the circle, the polar angle of the vector $\vec{CA}$ is $\theta+\pi/2$. The length of $\vec{CA}$ is $r$. Therefore, its Cartesian coordinates are
$$\vec {CA} = ( r\cos(\theta+\pi/2), r\sin(\theta+\pi/2)) = ( -r\sin(\theta), r\cos(\theta)) $$
Next, we need the coordinates of the vector $\vec{CB}$. Its length is also $r$. Since $\angle ACB$ is $L/r$ radian, the polar angle of $\vec{CB}$ is $\theta+\pi/2-L/r$. Convert to Cartesian:
$$\vec {CB} = ( r\cos(\theta+\pi/2-L/r), r\sin(\theta+\pi/2-L/r)) = ( -r\sin(\theta-L/r), r\cos(\theta-L/r)) $$
Finally, $\vec{AB}=\vec{CB}-\vec{CA}$, which yields
$$\boxed{\vec {AB} = ( -r\sin(\theta-L/r)+r\sin(\theta), r\cos(\theta-L/r)-r\cos(\theta)) } $$

These can be rewritten using some trigonometric identities, but I don't think it would win anything. As a sanity check, consider what happens when $L=0$: the vector is zero, hence $B$ is the same as $A$. As an aside, if $r\to \infty$ the curve becomes a straight line segment, but figuring out the limit is an exercise in calculus. `:-)`

If the curve bends counterclockwise, the signs will be different in a few places. Namely, the polar angle of $\vec{CA}$ will be $\theta-\pi/2$, hence
$$\vec {CA} = ( r\sin(\theta), -r\cos(\theta)) $$
The polar angle of $\vec{CB}$ will be $\theta-\pi/2+L/r$, hence
$$\vec {CB} = ( r\sin(\theta+L/r), -r\cos(\theta+L/r)) $$
The conclusion in this case is
$$\boxed{\vec {AB} = ( r\sin(\theta+L/r)-r\sin(\theta), -r\cos(\theta+L/r)+r\cos(\theta))}$$

Later: a simpler solution for the case when $C$ is given. First, calculate the vector $\vec{CA}$ and convert it to polar coordinates using these formulas. Then either increase or decrease the angle by $L/r$, depending on counterclockwise/clockwise choice.

Since you wanted JavaScript, I made a jsfiddle and also copied the code below. The parameters are coordinates of A and C, as well as length of the arc and the direction. The radius $r$ is calculated within the function.

```
function findB(Ax, Ay, Cx, Cy, L, clockwise) {
var r = Math.sqrt(Math.pow(Ax - Cx, 2) + Math.pow(Ay - Cy, 2));
var angle = Math.atan2(Ay - Cy, Ax - Cx);
if (clockwise) {
angle = angle - L / r;
}
else {
angle = angle + L / r;
}
var Bx = Cx + r * Math.cos(angle);
var By = Cy + r * Math.sin(angle);
return [Bx, By];
}
document.write(findB(0, 1, 1, 0, 1, true));
```

## Best Answer

In $\bigcirc O$, let $\angle AOB=2\theta$. OP asks how to "push" chord $\overline{AB}$ to arc $\stackrel{\frown}{AB}$, and proposes specifically the strategy of projecting from the center $O$, as shown with points $P$ and $P'$ in these figures:

Formulating of the projection is simple: divide $\overrightarrow{OP}$ by its length, then scale it by the radius of the circle; ie, $$\overrightarrow{OP'} = \frac{r}{|OP|} \overrightarrow{OP} \tag1$$ Less elegantly (but more-instructively), if we define $p := \dfrac{|AP|}{|PB|}$ (so that $P=\dfrac{A+pB}{1+p}$) as a parameter that ranges from $0$ (when $P=A$) to $\infty$ (when $P=B$), we can write $$P' = \left(\;\frac{r (1 + p \cos2\theta)}{\sqrt{1 + 2 p \cos2\theta+p^2}}\;,\; \frac{r p\sin2\theta}{\sqrt{1+ 2 p \cos2 \theta+p^2}}\;\right) \tag2$$

Unfortunately, such a projection is problematic when $\angle AOB=180^\circ$, as shown in the second figure; all the vectors $\overline{OP}$ are "flat", so their projections will only land at $A$ or $B$ (point $O$ projects to itself). This is reflected in how $(2)$ reduces when $\theta=90^\circ$: $$P' = \left(\;\frac{r (1-p)}{|1-p|}\;,\; 0\;\right) \tag{2'}$$

In a comment, I suggested an alternative.

Instead of projecting from $O$, project from the midpoint of the "other" arc of the circle ($M$ in the figures), as shown with points $Q$ and $Q'$. Here, defining $q := \dfrac{|AQ|}{|AB|}$, we can write $$Q' =\left(\;\frac{r (1 + 2 q \cos\theta + q^2 \cos2\theta)}{1 + 2q\cos\theta + q^2}, \frac{2r q \sin\theta(1 + q\cos\theta)}{1 + 2 q\cos\theta+q^2}\;\right) \tag3$$ This strategy works even when $\angle AOB = 180^\circ$, as the $\theta=90^\circ$ form of $(3)$ is $$Q' =\left(\;\frac{r (1-q^2)}{1+q^2}, \frac{2rq}{1+q^2}\;\right) \tag{3'}$$ which, by interesting coincidence, corresponds to the Weierstrauss tangent-half-angle parameterization of the (upper semi)circle. (Fun Fact: It's not a coincidence!)

OP has commented that the second projection (via $M$) is "flawed" because it doesn't divide the arc evenly. This is true: except when $Q$ is the midpoint (or an endpoint) of the chord, the projection doesn't transfer the chord ratio to the arc; ie, $|AQ|:|QB|\neq|\stackrel{\frown}{AQ'}|:|\stackrel{\frown}{Q'B}|$. But this is also true of OP's projection (via $O$).

Indeed, there is no "geometric construction" (in the classical sense) to get from every $P$ on the chord to the corresponding $P'$ on the arc such that $|AP|:|PB|\neq|\stackrel{\frown}{AP'}|:|\stackrel{\frown}{P'B}|$. In particular, if $P$ "trisects" the chord then $P'$ would have to

trisectthe arc, giving a trisection of $\angle AOB$ which is a famously impossible thing to accomplish via straightedge-and-compass techniques. (So, it's certainly impossible to accomplish via a simple projection from some given point. See this answer for a quick proof when the point is the center of the circle.)If $P'$ is required to divide the arc the same way $P$ divides the chord, for every $P$ on that chord, then essentially the best one can do is to write $$P' = \left(r \cos\frac{2p\,\theta}{1+p}, r\sin\frac{2p\,\theta}{1+p}\right) \tag4$$ although this lacks the sense of geometrically "pushing" the chord to the arc.