# Biarc

Fig. 1

A biarc is a smooth curve formed from two circular arcs.[1] In order to make the biarc smooth (G1 continuous), the two arcs should have the same tangent at the connecting point where they meet.

Biarcs are commonly used in geometric modeling and computer graphics. They can be used to approximate splines and other plane curves by placing the two outer endpoints of the biarc along the curve to be approximated, with a tangent that matches the curve, and then choosing a middle point that best fits the curve. This choice of three points and two tangents determines a unique pair of circular arcs, and the locus of middle points for which these two arcs form a biarc is itself a circular arc. In particular, to approximate a Bézier curve in this way, the middle point of the biarc should be chosen as the incenter of the triangle formed by the two endpoints of the Bézier curve and the point where their two tangents meet. More generally, one can approximate a curve by a smooth sequence of biarcs; using more biarcs in the sequence will in general improve the approximation's closeness to the original curve.

## Examples of biarc curves

1. In the below examples biarcs ${\displaystyle A(J)B}$ are subtended by the chord ${\displaystyle AB,}$ and ${\displaystyle J}$ is the join point. Tangent vector at the start point ${\displaystyle A}$ is ${\displaystyle \mathbf {n} (\alpha )}$, and ${\displaystyle \mathbf {n} (\beta )}$ is the tangent at the end point ${\displaystyle B:}$
${\displaystyle \mathbf {n} (\alpha )=||\cos \alpha ,\,\sin \alpha ||^{T},\quad \mathbf {n} (\beta )=||\cos \beta ,\,\sin \beta ||^{T}.\qquad (1)}$
2. Fig. 2 shows six examples of biarcs ${\displaystyle AJB.}$
• Biarc 1 is drawn with ${\displaystyle \alpha =100^{\circ },\;\beta =30^{\circ }.}$ Biarcs 2-6 have ${\displaystyle \alpha =100^{\circ },\;\beta =-30^{\circ }.}$
• In examples 1, 2, 6 curvature changes sign, and the join point ${\displaystyle J}$ is also the inflection point. Biarc 3 includes the straight line segment ${\displaystyle JB}$.
• Biarcs 1–4 are short in the sense that they do not turn near endpoints. Alternatively, biarcs 5,6 are long: turning near one of endpoints means that they intersect the left or the right complement of the chord to the infinite straight line.
• Biarcs 2–6 share end tangents. They can be found in the lower fragment of Fig. 3, among the family of biarcs with common tangents.
3. Fig. 3 shows two examples of biarc families, sharing end points and end tangents.
4. Fig. 4 shows two examples of biarc families, sharing end points and end tangents, end tangents being parallel: ${\displaystyle \alpha =\beta .}$
5. Fig. 5 shows specific families with either ${\displaystyle |\alpha |=\pi }$  or  ${\displaystyle |\beta |=\pi .}$
 Fig. 2. Examples of biarcs Fig. 3. Biarcs families with common tangents (two examples) Fig. 4. Biarcs families with parallel end tangents
Fig 5. Biarcs families with either ${\displaystyle |\alpha |=\pi }$ or ${\displaystyle |\beta |=\pi }$

Different colours in figures 3, 4, 5 are explained below as subfamilies ${\displaystyle \color {sienna}{\mathcal {B}}^{\,+}}$, ${\displaystyle \color {blue}{\mathcal {B}}_{1}^{\,-}}$, ${\displaystyle \color {green}{\mathcal {B}}_{2}^{\,-}}$. In particular, for biarcs, shown in brown on shaded background (lens-like or lune-like), the following holds:

• the total rotation (turning angle) of the curve is exactly ${\displaystyle \beta -\alpha }$ (not ${\displaystyle \beta -\alpha \pm 2\pi }$, which is the rotation for other biarcs);
• ${\displaystyle \operatorname {sgn}(\alpha +\beta )=\operatorname {sgn}(k_{2}-k_{1})}$: the sum ${\displaystyle \alpha +\beta }$ is the angular width of the lens/lune, covering the biarc, whose sign corresponds to either increasing (+1) or decreasing curvature (-1) of the biarc, according to generalized Vogt's theorem (ru).

## Family of biarcs with common end tangents

A family of biarcs with common end points ${\displaystyle A=(-c,0)}$, ${\displaystyle B=(c,0)}$, and common end tangents (1) is denoted as ${\displaystyle {\mathcal {B}}(p;\,\alpha ,\beta ,c),}$ or, briefly, as ${\displaystyle {\mathcal {B}}(p),}$ ${\displaystyle p}$ being the family parameter. Biarc properties are described below in terms of article.[2]

1. Constructing of a biarc is possible if
${\displaystyle -\pi \leqslant \alpha \leqslant \pi ,\quad -\pi \leqslant \beta \leqslant \pi ,\qquad 0<|\alpha +\beta |<2\pi .\qquad \qquad (2)}$
2. Denote
• ${\displaystyle k_{1}}$, ${\displaystyle \theta _{1}}$ and ${\displaystyle L_{1}}$  the curvature, the turning angle and the length of the arc ${\displaystyle AJ}$:    ${\displaystyle \theta _{1}=k_{1}L_{1}}$;
• ${\displaystyle k_{2}}$, ${\displaystyle \theta _{2}}$ and ${\displaystyle L_{2}}$  the same for the arc ${\displaystyle JB}$:    ${\displaystyle \theta _{2}=k_{2}L_{2}}$.
Then
${\displaystyle k_{1}(p)=-{\frac {1}{c}}\left(\sin \alpha +p^{-1}\sin \omega \right),\quad k_{2}(p)={\frac {1}{c}}\left(\sin \beta +p\sin \omega \right),\quad {\text{where}}\quad \omega ={\frac {\alpha +\beta }{2}}}$
(due to (2), ${\displaystyle \sin \omega \not =0}$). Turning angles:
${\displaystyle \theta _{1}(p)=2\arg \left(\mathrm {e} ^{-\mathrm {i} \alpha }+p^{-1}{\mathrm {e} ^{-\mathrm {i} \omega }}\right),\quad \theta _{2}(p)=2\arg \left(\mathrm {e} ^{\mathrm {i} \beta }+p\,\mathrm {e} ^{\mathrm {i} \omega }\right).}$
3. The locus of join points ${\displaystyle J}$ is the circle
${\displaystyle X_{J}(p)={\frac {c(p^{2}-1)}{p^{2}+2p\cos \gamma +1}},\quad Y_{J}(p)={\frac {2cp\sin \gamma }{p^{2}+2p\cos \gamma +1}},\quad {\text{where}}\quad \gamma ={\frac {\alpha -\beta }{2}}}$
(shown dashed in Fig.3, Fig.5). This circle (straight line if ${\displaystyle \gamma =0}$, Fig.4) passes through points ${\displaystyle A,B,}$ the tangent at ${\displaystyle A}$ being ${\displaystyle \mathbf {n} (\gamma ).}$ Biarcs intersect this circle under the constant angle  ${\displaystyle -\omega .}$
4. Tangent vector to the biarc ${\displaystyle {\mathcal {B}}(p)}$ at the join point is ${\displaystyle \mathbf {n} \left(\tau _{{}_{J}}\right)}$, where
${\displaystyle \tau _{{}_{J}}(p)={-2}\operatorname {arctan} {\dfrac {p\sin {\frac {\alpha }{2}}+\sin {\frac {\beta }{2}}}{p\cos {\frac {\alpha }{2}}+\cos {\frac {\beta }{2}}}}.}$
5. Biarcs with ${\displaystyle p=\pm 1}$ have the join point on the Y-axis ${\displaystyle (X_{J}=0),}$ and yield the minimal curvature jump, ${\displaystyle \min \left|k_{2}(p)-k_{1}(p)\right|,}$ at ${\displaystyle J.}$
6. Degenerate biarcs are:
• Biarc ${\displaystyle {\mathcal {B}}(0)}$: as ${\displaystyle p\to 0}$, ${\displaystyle J(p)\to A}$, arc ${\displaystyle AJ}$ vanishes.
• Biarc ${\displaystyle {\mathcal {B}}(\infty )}$: as ${\displaystyle p\to \pm \infty }$, ${\displaystyle J(p)\to B}$, arc ${\displaystyle JB}$ vanishes.
• Discontinuous biarc ${\displaystyle {\mathcal {B}}(p^{\ast })}$ includes straight line ${\displaystyle AP_{\infty }J}$ or ${\displaystyle JP_{\infty }B,}$ and passes through the infinite point ${\displaystyle P_{\infty }}$:
${\displaystyle \qquad p^{\ast }=\left\{{\begin{array}{lll}-{\dfrac {\sin \omega }{\sin \alpha }},\quad &{\text{if}}\;|\alpha |\geqslant |\beta |\quad (|\alpha |=\pi \;\Longrightarrow \;p^{\ast }=-\infty ),\\-{\dfrac {\sin \beta }{\sin \omega }},\quad &{\text{if}}\;|\alpha |\leqslant |\beta |\quad (|\beta |=\pi \;\Longrightarrow \;p^{\ast }=0).\end{array}}\right.}$
Darkened lens-like region in Figs.3,4 is bounded by biarcs ${\displaystyle {\mathcal {B}}(0),\,{\mathcal {B}}(\infty ).}$ It covers biarcs with ${\displaystyle p>0.}$ Discontinuous biarc is shown by red dash-dotted line.
7. The whole family ${\displaystyle {\mathcal {B}}(p;\,\alpha ,\beta ,c)}$ can be subdivided into three subfamilies of non-degenerate biarcs:
${\displaystyle {\begin{array}{l}{\mathcal {B}}^{\,+}(p){:}\quad p\in (0;\infty );\\{\mathcal {B}}_{1}^{\,-}(p){:}\quad p\in (p^{\ast };0);\\{\mathcal {B}}_{2}^{\,-}(p){:}\quad p\in (-\infty ;p^{\ast });\\\left[{\mathcal {B}}^{\,-}(p)={\mathcal {B}}_{1}^{\,-}(p)\cup {\mathcal {B}}_{2}^{\,-}(p)\right].\end{array}}}$
Subfamily ${\displaystyle {\mathcal {B}}_{1}^{\,-}}$ vanishes if ${\displaystyle p^{\ast }=0}$     ${\displaystyle (|\beta |=\pi ).}$ Subfamily ${\displaystyle {\mathcal {B}}_{2}^{\,-}}$ vanishes if ${\displaystyle p^{\ast }=-\infty }$ ${\displaystyle (|\alpha |=\pi ).}$ In figures 3, 4, 5 biarcs ${\displaystyle \color {sienna}{\mathcal {B}}^{\,+}}$ are shown in brown, biarcs ${\displaystyle \color {blue}{\mathcal {B}}_{1}^{\,-}}$ in blue, and biarcs ${\displaystyle \color {green}{\mathcal {B}}_{2}^{\,-}}$ in green.

## References

1. ^ Bolton, K. M. (1975). "Biarc curves". Computer-Aided Design. 7 (2): 89–92. doi:10.1016/0010-4485(75)90086-X.
2. ^ Kurnosenko, A. I. (2013). "Biarcs and bilens" (PDF). Computer Aided Geometric Design. 30 (3): 310–330. doi:10.1016/j.cagd.2012.12.002.
• Nutbourne, A. W.; Martin, R. R. (1988). Differential geometry applied to curve and surface design. Vol.1: Foundations. Ellis Horwood. ISBN 978-0132118224.