Biarc

From HandWiki
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 [math]\displaystyle{ A(J)B }[/math] are subtended by the chord [math]\displaystyle{ AB, }[/math] and [math]\displaystyle{ J }[/math] is the join point. Tangent vector at the start point [math]\displaystyle{ A }[/math] is [math]\displaystyle{ \mathbf{n}(\alpha) }[/math], and [math]\displaystyle{ \mathbf{n}(\beta) }[/math] is the tangent at the end point [math]\displaystyle{ B: }[/math]

    [math]\displaystyle{ \mathbf{n}(\alpha) = \left\|\cos\alpha,\,\sin\alpha\right\|^T,\quad \mathbf{n}(\beta) = \left\|\cos\beta,\,\sin\beta\right\|^T. }[/math]

     

     

     

     

    (1)

  2. Fig. 2 shows six examples of biarcs [math]\displaystyle{ AJB. }[/math]
    • Biarc 1 is drawn with [math]\displaystyle{ \alpha=100^\circ,\;\beta=30^\circ. }[/math] Biarcs 2-6 have [math]\displaystyle{ \alpha=100^\circ,\;\beta=-30^\circ. }[/math]
    • In examples 1, 2, 6 curvature changes sign, and the join point [math]\displaystyle{ J }[/math] is also the inflection point. Biarc 3 includes the straight line segment [math]\displaystyle{ JB }[/math].
    • 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: [math]\displaystyle{ \alpha=\beta. }[/math]
  5. Fig. 5 shows specific families with either [math]\displaystyle{ |\alpha| = \pi }[/math] or [math]\displaystyle{ |\beta| = \pi. }[/math]
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 [math]\displaystyle{ |\alpha|=\pi }[/math] or [math]\displaystyle{ |\beta|=\pi }[/math]

Different colours in figures 3, 4, 5 are explained below as subfamilies [math]\displaystyle{ \color{sienna}\mathcal{B}^{\,+} }[/math], [math]\displaystyle{ \color{blue}\mathcal{B}^{\,-}_1 }[/math], [math]\displaystyle{ \color{green}\mathcal{B}^{\,-}_2 }[/math]. 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 [math]\displaystyle{ \beta-\alpha }[/math] (not [math]\displaystyle{ \beta-\alpha\pm 2\pi }[/math], which is the rotation for other biarcs);
  • [math]\displaystyle{ \sgn(\alpha+\beta)=\sgn(k_2-k_1) }[/math]: the sum [math]\displaystyle{ \alpha+\beta }[/math] 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 [math]\displaystyle{ A = (-c,0) }[/math], [math]\displaystyle{ B = (c,0) }[/math], and common end tangents (1) is denoted as [math]\displaystyle{ \mathcal{B}(p;\,\alpha,\beta,c), }[/math] or, briefly, as [math]\displaystyle{ \mathcal{B}(p), }[/math] [math]\displaystyle{ p }[/math] being the family parameter. Biarc properties are described below in terms of article.[2]

  1. Constructing of a biarc is possible if

    [math]\displaystyle{ -\pi\leqslant\alpha\leqslant\pi,\quad -\pi\leqslant\beta\leqslant\pi,\qquad 0 \lt |\alpha+\beta| \lt 2\pi. }[/math]

     

     

     

     

    (2)

  2. Denote
    • [math]\displaystyle{ k_1 }[/math], [math]\displaystyle{ \theta_1 }[/math] and [math]\displaystyle{ L_1 }[/math]  the curvature, the turning angle and the length of the arc [math]\displaystyle{ AJ }[/math]:    [math]\displaystyle{ \theta_1 = k_1 L_1 }[/math];
    • [math]\displaystyle{ k_2 }[/math], [math]\displaystyle{ \theta_2 }[/math] and [math]\displaystyle{ L_2 }[/math]  the same for the arc [math]\displaystyle{ JB }[/math]:    [math]\displaystyle{ \theta_2=k_2L_2 }[/math].
    Then [math]\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 }[/math] (due to (2), [math]\displaystyle{ \sin\omega\not=0 }[/math]). Turning angles: [math]\displaystyle{ \theta_1(p)=2\arg\left(e^{-i\alpha} +p^{-1}{e^{-i\omega}}\right),\quad \theta_2(p)=2\arg\left(e^{ i\beta } +p\, e^{i\omega}\right). }[/math]
  3. The locus of join points [math]\displaystyle{ J }[/math] is the circle [math]\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 }[/math] (shown dashed in Fig.3, Fig.5). This circle (straight line if [math]\displaystyle{ \gamma=0 }[/math], Fig.4) passes through points [math]\displaystyle{ A,B, }[/math] the tangent at [math]\displaystyle{ A }[/math] being [math]\displaystyle{ \mathbf{n}(\gamma). }[/math] Biarcs intersect this circle under the constant angle  [math]\displaystyle{ -\omega. }[/math]
  4. Tangent vector to the biarc [math]\displaystyle{ \mathcal{B}(p) }[/math] at the join point is [math]\displaystyle{ \mathbf{n}\left(\tau_{{}_J}\right) }[/math], where [math]\displaystyle{ \tau_{\scriptscriptstyle J}(p)={-2} \arctan \dfrac{p\sin\frac{\alpha}2+\sin\frac{\beta}2}{p\cos\frac{\alpha}2+\cos\frac{\beta}2}. }[/math]
  5. Biarcs with [math]\displaystyle{ p = \pm1 }[/math] have the join point on the Y-axis [math]\displaystyle{ (X_J=0), }[/math] and yield the minimal curvature jump, [math]\displaystyle{ \min\left|k_2(p)-k_1(p)\right|, }[/math] at [math]\displaystyle{ J. }[/math]
  6. Degenerate biarcs are:
    • Biarc [math]\displaystyle{ \mathcal{B}(0) }[/math]: as [math]\displaystyle{ p \to 0 }[/math], [math]\displaystyle{ J(p) \to A }[/math], arc [math]\displaystyle{ AJ }[/math] vanishes.
    • Biarc [math]\displaystyle{ \mathcal{B}(\infty) }[/math]: as [math]\displaystyle{ p \to \pm\infty }[/math], [math]\displaystyle{ J(p) \to B }[/math], arc [math]\displaystyle{ JB }[/math] vanishes.
    • Discontinuous biarc [math]\displaystyle{ \mathcal{B}(p^\ast) }[/math] includes straight line [math]\displaystyle{ AP_\infty J }[/math] or [math]\displaystyle{ JP_\infty B, }[/math] and passes through the infinite point [math]\displaystyle{ P_\infty }[/math]: [math]\displaystyle{ p^\ast= \begin{cases} -\dfrac{\sin\omega}{\sin\alpha}, & \text{if}\; |\alpha|\geqslant|\beta|\quad(|\alpha|=\pi\;\Longrightarrow\; p^\ast=-\infty),\\[1ex] -\dfrac{\sin\beta}{\sin\omega}, & \text{if}\; |\alpha|\leqslant|\beta|\quad(|\beta|=\pi\;\Longrightarrow\; p^\ast=0). \end{cases} }[/math]
    Darkened lens-like region in Figs.3,4 is bounded by biarcs [math]\displaystyle{ \mathcal{B}(0),\,\mathcal{B}(\infty). }[/math] It covers biarcs with [math]\displaystyle{ p\gt 0. }[/math] Discontinuous biarc is shown by red dash-dotted line.
  7. The whole family [math]\displaystyle{ \mathcal{B}(p;\,\alpha,\beta,c) }[/math] can be subdivided into three subfamilies of non-degenerate biarcs: [math]\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} }[/math] Subfamily [math]\displaystyle{ \mathcal{B}^{\,-}_1 }[/math] vanishes if [math]\displaystyle{ p^\ast=0 }[/math]   [math]\displaystyle{ (|\beta|=\pi). }[/math] Subfamily [math]\displaystyle{ \mathcal{B}^{\,-}_2 }[/math] vanishes if [math]\displaystyle{ p^\ast=-\infty }[/math] [math]\displaystyle{ (|\alpha|=\pi). }[/math] In figures 3, 4, 5 biarcs [math]\displaystyle{ \color{sienna}\mathcal{B}^{\,+} }[/math] are shown in brown, biarcs [math]\displaystyle{ \color{blue}\mathcal{B}^{\,-}_1 }[/math] in blue, and biarcs [math]\displaystyle{ \color{green}\mathcal{B}^{\,-}_2 }[/math] 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. https://www.researchgate.net/publication/257014166. 
  • Nutbourne, A. W.; Martin, R. R. (1988). Differential geometry applied to curve and surface design. Vol.1: Foundations. Ellis Horwood. ISBN 978-0132118224. 

External links