Английская Википедия:Biarc

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Файл:Biarc.svg
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>A(J)B</math> are subtended by the chord <math>AB,</math> and <math>J</math> is the join point. Tangent vector at the start point <math>A</math> is <math>\mathbf{n}(\alpha)</math>, and <math>\mathbf{n}(\beta)</math> is the tangent at the end point <math>B:</math> Шаблон:NumBlk
  2. Fig. 2 shows six examples of biarcs <math>AJB.</math>
    • Biarc 1 is drawn with <math>\alpha=100^\circ,\;\beta=30^\circ.</math> Biarcs 2-6 have <math>\alpha=100^\circ,\;\beta=-30^\circ.</math>
    • In examples 1, 2, 6 curvature changes sign, and the join point <math>J</math> is also the inflection point. Biarc 3 includes the straight line segment <math>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>\alpha=\beta.</math>
  5. Fig. 5 shows specific families with either Шаблон:Nowrap
Файл:Biarcs 6 Examples.png
Fig. 2. Examples of biarcs
Файл:BiarcsWiki1.png
Fig. 3. Biarcs families with common tangents (two examples)
Файл:BiarcsWiki2.png
Fig. 4. Biarcs families with parallel end tangents
Файл:BiarcsWikiPi.png
=\pi</math>

Different colours in figures 3, 4, 5 are explained below as subfamilies <math>\color{sienna}\mathcal{B}^{\,+}</math>, <math>\color{blue}\mathcal{B}^{\,-}_1</math>, <math>\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>\beta-\alpha</math> (not <math>\beta-\alpha\pm 2\pi</math>, which is the rotation for other biarcs);
  • <math>\sgn(\alpha+\beta)=\sgn(k_2-k_1)</math>: the sum <math>\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 (Шаблон:Ill).

Family of biarcs with common end tangents

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

  1. Constructing of a biarc is possible if Шаблон:NumBlk
  2. Denote
    • <math>k_1</math>, <math>\theta_1</math> and <math>L_1</math>  the curvature, the turning angle and the length of the arc <math>AJ</math>:    <math>\theta_1 = k_1 L_1</math>;
    • <math>k_2</math>, <math>\theta_2</math> and <math>L_2</math>  the same for the arc <math>JB</math>:    <math>\theta_2=k_2L_2</math>.
    Then <math display="block">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 Шаблон:EquationNote, <math>\sin\omega\not=0</math>). Turning angles: <math display="block"> \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>J</math> is the circle <math display="block"> 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>\gamma=0</math>, Fig.4) passes through points <math>A,B,</math> the tangent at <math>A</math> being <math>\mathbf{n}(\gamma).</math> Biarcs intersect this circle under the constant angle  <math>-\omega.</math>
  4. Tangent vector to the biarc <math>\mathcal{B}(p)</math> at the join point is <math>\mathbf{n}\left(\tau_{{}_J}\right)</math>, where <math display="block"> \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>p = \pm1</math> have the join point on the Y-axis <math>(X_J=0),</math> and yield the minimal curvature jump, <math>\min\left|k_2(p)-k_1(p)\right|,</math> at <math>J.</math>
  6. Degenerate biarcs are:
    • Biarc <math>\mathcal{B}(0)</math>: as <math>p \to 0</math>, <math>J(p) \to A</math>, arc <math>AJ</math> vanishes.
    • Biarc <math>\mathcal{B}(\infty)</math>: as <math>p \to \pm\infty</math>, <math>J(p) \to B</math>, arc <math>JB</math> vanishes.
    • Discontinuous biarc <math>\mathcal{B}(p^\ast)</math> includes straight line <math>AP_\infty J</math> or <math>JP_\infty B,</math> and passes through the infinite point <math>P_\infty</math>: <math display="block">
    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>\mathcal{B}(0),\,\mathcal{B}(\infty).</math> It covers biarcs with <math>p>0.</math> Discontinuous biarc is shown by red dash-dotted line.
  7. The whole family <math>\mathcal{B}(p;\,\alpha,\beta,c)</math> can be subdivided into three subfamilies of non-degenerate biarcs: <math display="block"> \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>\mathcal{B}^{\,-}_1</math> vanishes if <math>p^\ast=0</math>   <math>(|\beta|=\pi).</math> Subfamily <math>\mathcal{B}^{\,-}_2</math> vanishes if <math>p^\ast=-\infty</math> <math>(|\alpha|=\pi).</math> In figures 3, 4, 5 biarcs <math>\color{sienna}\mathcal{B}^{\,+}</math> are shown in brown, biarcs <math>\color{blue}\mathcal{B}^{\,-}_1</math> in blue, and biarcs <math>\color{green}\mathcal{B}^{\,-}_2</math> in green.

References

Шаблон:Reflist

External links