This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Bézout coefficients of coprime numbers approximate quadratic Bézier curves

Benjamín A. Itzá-Ortiz Corresponding author: [email protected] Centro de Investigación en Matemáticas, Universidad Autónoma del Estado de Hidalgo, Pachuca, Hidalgo, Mexico Roberto López-Hernández Centro de Investigación en Matemáticas, Universidad Autónoma del Estado de Hidalgo, Pachuca, Hidalgo, Mexico Pedro Miramontes Facultad de Ciencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
(December 17th, 2020)
Abstract

Given a point (p,q)(p,q) with nonnegative integer coordinates and pqp\not=q, we prove that the quadratic Bézier curve relative to the points (p,q)(p,q), (0,0)(0,0) and (q,p)(q,p) is approximately the envelope of a family of segments whose endpoints are the Bézout coefficients of coprime numbers belonging to neighborhoods of (p,q)(p,q) and (q,p)(q,p), respectively.

Keywords: Bézier quadratic curve, Bézout coefficients, coprime numbers.

Introduction

Bézier curves are parametrized curves extensively used in computer aided geometric design (CAGD) [2]. Bézier curves are related to Berenstein polynomials, they have very interesting mathematical properties and the literature contains many proposals of algorithms for their algebraic construction and their visualization [3, 5]. In this work, we will focus on quadratic Bézier curves. Since a quadratic Bézier curve may be described as the envelope of a family of segments whose endpoints move along two straight lines, then it is conceivable to replace this family of lines with another suitable family of lines whose corresponding endpoints are close to each other. When the quadratic Bézier curve is relative to the points (p,q)(p,q), (0,0)(0,0) and (q,p)(q,p), it turns out that such replacement lines may be characterized as having as endpoints pairs of Bézout coefficients of coprime numbers close to the points (p,q)(p,q) and (q,p)(q,p), respectively. The main observation that leads to the verification of this statement is fairly simple: Denote P0=(p,q)P_{0}=(p,q), P1=(0,0)P_{1}=(0,0) and P2=(q,p)P_{2}=(q,p) and suppose that the coprime pair of positive numbers (r,s)(r,s) is close to the pair (p,q)(p,q). Then, the Bézout coefficients Q1Q_{1} and Q2Q_{2} of the two coprime pairs (r,s)(r,s) and (s,r)(s,r), respectively, are close to their projections R1R_{1} and R2R_{2} on the lines P0P1P_{0}P_{1} and P1P2P_{1}P_{2}, respectively. Moreover, the distance from R1R_{1} to P0P_{0} is approximately the same as the distance from R2R_{2} to P1P_{1}. Hence, the line with endpoints Q1Q_{1} and Q2Q_{2} is the candidate to replace a line in the envelope of the quadratic Bézier curve associated to P0P_{0}, P1P_{1} and P2P_{2}. When the norm of (p,q)(p,q) is sufficiently large, there will be many coprime pairs in a neighbourhood of (p,q)(p,q). Thus, when plotting all such lines with endpoints Q1Q_{1} and Q2Q_{2}, they will approximate the quadratic Bézier curve corresponding to P0P_{0}, P1P_{1} and P2P_{2}.

This work is divided in two sections. In Section 1 we establish the notation and state the elementary results needed in the rest of the paper and Section 2 contains the main results.

1 Bézier Quadratics

The linear Bézier curve for two points P0{P}_{0} and P1{P}_{1} in the plane, is defined as just the parametrized line t(1t)P0+tP1t\mapsto(1-t){P}_{0}+t{P}_{1} from P0P_{0} to P1P_{1}. Given three different points P0{P}_{0}, P1{P}_{1} and P2{P}_{2} in the plane, the quadratic Bézier curve is a parametrized curve in terms of the linear Bézier curves from P0{P}_{0} to P1{P}_{1} and from P1{P}_{1} to P2{P}_{2}, that is, the quadratic Bézier curve for the three points P0{P}_{0}, P1{P}_{1} and P2{P}_{2} in the Cartesian plane, is the parametric curve:

t\displaystyle t (1t)((1t)P0+tP1)+t((1t)P1+tP2)=(1t)2P0+2(1t)tP1+t2P2.\displaystyle\mapsto(1-t)\left((1-t){P}_{0}+t{P}_{1}\right)+t\left((1-t){P}_{1}+t{P}_{2}\right)=(1-t)^{2}{P}_{0}+2(1-t)t{P}_{1}+t^{2}{P}_{2}.
Definition 1.1.

Given a pair of nonnegative integers (p,q)(p,q), we will denote by αp,q\alpha_{p,q} and βp,q\beta_{p,q} the linear Bézier curves corresponding to the pairs of points (p,q)(p,q), (0,0)(0,0) and (0,0)(0,0), (q,p)(q,p), respectively. That is

αp,q(t)=(1t)(p,q) and βp,q(t)=t(q,p).\alpha_{p,q}(t)=(1-t)(p,q)\hskip 28.45274pt\text{ and }\hskip 28.45274pt\beta_{p,q}(t)=t(q,p).

In addition, for each 0s10\leq s\leq 1 we will denote by γs\gamma_{s} the parametric line through the points αp,q(s)\alpha_{p,q}(s) and βp,q(s)\beta_{p,q}(s). Therefore

γs(t)=(1t)αp,q(s)+tβp,q(s).\gamma_{s}(t)=(1-t)\alpha_{p,q}(s)+t\beta_{p,q}(s).

The quadratic Bézier curve cp,qc_{p,q} corresponding to P0=(p,q)P_{0}=(p,q), P1=(0,0)P_{1}=(0,0) and P2=(q,p)P_{2}=(q,p), is then defined as

cp,q(t)=(1t)αp,q(t)+tβp,q(t)=(1t)2(p,q)+t2(q,p) , 0t1.c_{p,q}(t)=(1-t)\alpha_{p,q}(t)+t\beta_{p,q}(t)=(1-t)^{2}(p,q)+t^{2}(q,p){\mbox{ , }}0\leq t\leq 1.

For each 0<t0<10<t_{0}<1, it is well known that a parametrization of the straight line tangent to cp,q(t)c_{p,q}(t) at the point cp,q(t0)c_{p,q}(t_{0}), when t=t0t=t_{0}, is the line γt0\gamma_{t_{0}}. Indeed, a parametrization of such a tangent line is:

cp,q(t0)+12(tt0)cp,q(t0)\displaystyle c_{p,q}(t_{0})+\dfrac{1}{2}(t-t_{0})c^{\prime}_{p,q}(t_{0}) =cp,q(t0)+(tt0)((1t0)(p,q)+t0(q,p))\displaystyle=c_{p,q}(t_{0})+(t-t_{0})\left(-(1-t_{0})(p,q)+t_{0}(q,p)\right)
=(1t0)((1t0)(tt0))(p,q)+t0(t0+(tt0))(q,p)\displaystyle=(1-t_{0})\left((1-t_{0})-(t-t_{0})\right)(p,q)+t_{0}\left(t_{0}+(t-t_{0})\right)(q,p)
=(1t)γp,q(t0)+tβp,q(t0)\displaystyle=(1-t)\gamma_{p,q}(t_{0})+t\beta_{p,q}(t_{0})
=γt0(t).\displaystyle=\gamma_{t_{0}}(t).

In fact, cp,qc_{p,q} may be described as the envelope of the family of lines γs\gamma_{s}.

The following notion was introduced as Definition 1 in [1].

Definition 1.2.

Given a pair of positive coprime integers (p,q)(p,q), we define the Bézout coefficients of (p,q)(p,q) as the unique pair of coprime numbers, denoted (p,q)=(a,b)\mathcal{B}(p,q)=(a,b), such that 0<ap0<a\leq p, 0b<q0\leq b<q and satisfy Bézout’s identity

aqbp=1.aq-bp=1.

The following proposition gives a couple of formulas relating the Bézout coefficients of a coprime pair and the Bézout coefficients of the flipped pair.

Proposition 1.3.

Let (p,q)(p,q) be a coprime pair of nonnegative integers. If (p,q)=(a,b)\mathcal{B}(p,q)=(a,b) then following identities hold.

  1. 1.

    (q,p)=(qb,pa)\mathcal{B}(q,p)=(q-b,p-a).

  2. 2.

    (b+q,a+p)=(q,p)\mathcal{B}(b+q,a+p)=(q,p).

Proof.

Let p1p\geq 1 and q1q\geq 1 be relatively prime positive numbers. Let us assume B(p,q)=(a,b)B(p,q)=(a,b), so that aqbp=1aq-bp=1, 0<ap0<a\leq p and 0b<q0\leq b<q. For part (1)(1), we calculate

p(qb)q(pa)\displaystyle p(q-b)-q(p-a) =aqbp\displaystyle=aq-bp
=1.\displaystyle=1.

Therefore, as 0pa<p0\leq p-a<p and 0<qbq0<q-b\leq q, we obtain

(q,p)=(qb,pa),\mathcal{B}(q,p)=(q-b,p-a),\\

as wanted.

To prove part (2)(2), we calculate

q(a+p)p(b+q)\displaystyle q(a+p)-p(b+q) =aqbp\displaystyle=aq-bp
=1.\displaystyle=1.

Therefore p+ap+a y b+qb+q are relatively prime [4, Theorem 5.1]. Since also the inequalities 0<qb+q0<q\leq b+q and 0pa+q0\leq p\leq a+q hold, we obtain

(b+q,a+p)\displaystyle\mathcal{B}(b+q,a+p) =(q,p),\displaystyle=(q,p),

as was to be proved.∎

We now prove a result that allows to argue why the points (r,s)\mathcal{B}(r,s) and (s,r)\mathcal{B}(s,r) are suitable substitutes for the endpoints of the envelope of the family of lines γs\gamma_{s} of the quadratic Bézier curve cp,qc_{p,q} relative to (p,q)(p,q), (0,0)(0,0) and (q,p)(q,p), when (r,s)(r,s) is close to (p,q)(p,q). More precisely, we prove that the distances from the projections of (p,q)\mathcal{B}(p,q) and (q,p)\mathcal{B}(q,p) on the lines y=qpxy=\frac{q}{p}x and y=pqxy=\frac{p}{q}x to (p,q)(p,q) and (0,0)(0,0), respectively, are equal. Furthermore, the distances from (p,q)\mathcal{B}(p,q) and (q,p)\mathcal{B}(q,p) to the lines y=qpxy=\dfrac{q}{p}x and y=pqxy=\dfrac{p}{q}x are both equal to the inverse of the norm of (p,q)(p,q). It will be proved in the next section why such segments with endpoints (r,s)\mathcal{B}(r,s) and (s,r)\mathcal{B}(s,r) plays the role of a segment γs\gamma_{s} in defining the quadratic Bézier curve cp,qc_{p,q}.

Proposition 1.4.

Let pp and qq be relatively prime positive numbers. The following conditions hold.

  1. 1.

    (p,q)(p,q)=(q,p)(0,0)\|\mathcal{B}(p,q)-(p,q)\|=\|\mathcal{B}(q,p)-(0,0)\|.

  2. 2.

    The distance from the point (p,q)\mathcal{B}(p,q) to the line y=qpxy=\dfrac{q}{p}x and the distance from the point (q,p)\mathcal{B}(q,p) to the line y=pqxy=\dfrac{p}{q}x are both equal to 1p2+q2\dfrac{1}{\sqrt{p^{2}+q^{2}}}.

  3. 3.

    Let t0=(p,q)(p,q)(p,q)2t_{0}=\dfrac{\mathcal{B}(p,q)\cdot(p,q)}{\|(p,q)\|^{2}}. Then projection of the point (p,q)\mathcal{B}(p,q) on the line y=qpxy=\dfrac{q}{p}x is t0(p,q)t_{0}(p,q) while the projection of the point (q,p)\mathcal{B}(q,p) on the line y=pqxy=\dfrac{p}{q}x is (1t0)(q,p)(1-t_{0})(q,p).

  4. 4.

    The distance from the point (p,q)(p,q) to the projection of (p,q)\mathcal{B}(p,q) on the line y=qpxy=\dfrac{q}{p}x is equal to the distance from the origin (0,0)(0,0) to the projection of (q,p)\mathcal{B}(q,p) on y=pqxy=\dfrac{p}{q}x.

Proof.

Let pp and qq be relatively prime positive integers. Assume (p,q)=(a,b)\mathcal{B}(p,q)=(a,b). From part (1) in Proposition 1.3 we see that (q,p)=(qb,pa)\mathcal{B}(q,p)=(q-b,p-a). Hence

(q,p)(0,0)\displaystyle\|\mathcal{B}(q,p)-(0,0)\| =(qb)2+(pa)2\displaystyle=\sqrt{(q-b)^{2}+(p-a)^{2}}
=(q,p)(b,a)\displaystyle=\|(q,p)-(b,a)\|
=(a,b)(p,q)\displaystyle=\|(a,b)-(p,q)\|
=(p,q)(p,q),\displaystyle=\|\mathcal{B}(p,q)-(p,q)\|,

thus proving (1).

For (2)(2), we compute the distance from (p,q)=(a,b)\mathcal{B}(p,q)=(a,b) to y=qpxy=\dfrac{q}{p}x to be

|aqbp|p2+q2\displaystyle\dfrac{\left|aq-bp\right|}{\sqrt{p^{2}+q^{2}}} =1p2+q2.\displaystyle=\dfrac{1}{\sqrt{p^{2}+q^{2}}}.

Similarly, if (p,q)=(a,b)\mathcal{B}(p,q)=(a,b) then the distance from (q,p)=(qb,pa)\mathcal{B}(q,p)=(q-b,p-a) to y=pqxy=\dfrac{p}{q}x is

|p(qb)q(pa)|p2+q2\displaystyle\dfrac{\left|p(q-b)-q(p-a)\right|}{\sqrt{p^{2}+q^{2}}} =1p2+q2.\displaystyle=\dfrac{1}{\sqrt{p^{2}+q^{2}}}.

Now, to prove (3), let us assume again that (p,q)=(a,b)\mathcal{B}(p,q)=(a,b). By Proposition 1.3 we then have (q,p)=(qb,pa)\mathcal{B}(q,p)=(q-b,p-a). The coordinates of the projection of (p,q)\mathcal{B}(p,q) on y=qpxy=\dfrac{q}{p}x are nothing but

(p,q)(p,q)(p,q)2(p,q)=t0(p,q),\dfrac{\mathcal{B}(p,q)\cdot(p,q)}{\|(p,q)\|^{2}}(p,q)=t_{0}(p,q),

while the coordinates of the projection of B(q,p)B(q,p) on y=pqxy=\dfrac{p}{q}x are

(q,p)(q,p)(q,p)2(q,p).\dfrac{\mathcal{B}(q,p)\cdot(q,p)}{\|(q,p)\|^{2}}(q,p).

By computing

1t0\displaystyle 1-t_{0} =1(p,q)(p,q)(p,q)2\displaystyle=1-\dfrac{\mathcal{B}(p,q)\cdot(p,q)}{\|(p,q)\|^{2}}
=(p,q)(p,q)(p,q)2(a,b)(p,q)(p,q)2\displaystyle=\dfrac{(p,q)\cdot(p,q)}{\|(p,q)\|^{2}}-\dfrac{(a,b)\cdot(p,q)}{\|(p,q)\|^{2}}
=(pa,qb)(p,q)(p,q)2\displaystyle=\dfrac{(p-a,q-b)\cdot(p,q)}{\|(p,q)\|^{2}}
=(q,p)(q,p)(p,q)2\displaystyle=\dfrac{\mathcal{B}(q,p)\cdot(q,p)}{\|(p,q)\|^{2}}

we complete the proof of (3)(3).

Finally, for the proof of (4)(4), notice that the triangle with vertices (p,q)\mathcal{B}(p,q), (p,q)(p,q) and the point on the line qxpy=0qx-py=0 closest to (p,q)\mathcal{B}(p,q) is congruent to the triangle with vertices (q,p)\mathcal{B}(q,p), (0,0)(0,0) and the point on the line pxqy=0px-qy=0 closest to (q,p)\mathcal{B}(q,p), by parts (1) and (2). Thus, (4) follows. We may also obtain the result by direct computation using part (3)(3) as follows.

(q,p)(q,p)(q,p)2(q,p)(0,0)\displaystyle\left\|\dfrac{\mathcal{B}(q,p)\cdot(q,p)}{\|(q,p)\|^{2}}(q,p)-(0,0)\right\| =(1t0)(q,p)\displaystyle=\left\|(1-t_{0})(q,p)\right\|
=(q,p)t0(q,p)\displaystyle=\left\|(q,p)-t_{0}(q,p)\right\|
=t0(p,q)(p,q)\displaystyle=\left\|t_{0}(p,q)-(p,q)\right\|
=(p,q)(p,q)(p,q)2(p,q)(p,q),\displaystyle=\left\|\dfrac{\mathcal{B}(p,q)\cdot(p,q)}{\|(p,q)\|^{2}}(p,q)-(p,q)\right\|,

as was to be proved. ∎

Since given a coprime pair (p,q)(p,q) the line with endpoints (p,q)\mathcal{B}(p,q) and (q,p)\mathcal{B}(q,p) will play an important role in the sequel, we introduce a notation for it next.

Definition 1.5.

For a pair (p,q)(p,q) of relatively prime positive numbers, we will denote by Lp,qL_{p,q} the linear Bézier curve from B(p,q)B(p,q) to B(q,p)B(q,p), that is, Lp,q(t)=(1t)(p,q)+t(q,p)L_{p,q}(t)=(1-t)\,\mathcal{B}(p,q)+t\,\mathcal{B}(q,p). We will call Lp,qL_{p,q} the Bézier-Bézout segment corresponding to (p,q)(p,q).

Finally, we will define what we mean for two segments to be “close”.

Definition 1.6.

Let LiL_{i} be a segment with endpoints at AiA_{i} and BiB_{i}, for i=1,2i=1,2. We define the distance from L1L_{1} to L2L_{2} as

dist(L1,L2)=max{min{A1A2,A1B2},min{B1A2,B1B2}}.\mathrm{dist}(L_{1},L_{2})=\max\left\{\min\{\|A_{1}-A_{2}\|,\|A_{1}-B_{2}\|\},\min\{\|B_{1}-A_{2}\|,\|B_{1}-B_{2}\|\}\right\}.

We have the following straightforward result.

Proposition 1.7.

Let LiL_{i} be a segment in n\mathbb{R}^{n} with end points at AiA_{i} and BiB_{i}, for i=1,2i=1,2. Suppose that A1A2=min{A1A2,A1B2}\|A_{1}-A_{2}\|=\min\{\|A_{1}-A_{2}\|,\|A_{1}-B_{2}\|\} and B1B2=min{B1A2,B1B2}\|B_{1}-B_{2}\|=\min\{\|B_{1}-A_{2}\|,\|B_{1}-B_{2}\|\}. Consider γi(t)=(1t)Ai+tBi\gamma_{i}(t)=(1-t)A_{i}+tB_{i} a parametrization of LiL_{i}. If dist(L1,L2)<ϵ\mathrm{dist}(L_{1},L_{2})<\epsilon, for some ϵ>0\epsilon>0, then γ1(t)γ2(t)<ϵ\|\gamma_{1}(t)-\gamma_{2}(t)\|<\epsilon, for every 0t10\leq t\leq 1.

Proof.

Assume that dist(L1,L2)<ϵ\mathrm{dist}(L_{1},L_{2})<\epsilon. Let 0t10\leq t\leq 1. Then

γ1(t)γ2(t)\displaystyle\|\gamma_{1}(t)-\gamma_{2}(t)\| (1t)A1A2+tB1B2\displaystyle\leq(1-t)\|A_{1}-A_{2}\|+t\|B_{1}-B_{2}\|
=(1t)min{A1A2,A1B2}+tmin{B1A2,B1B2}\displaystyle=(1-t)\min\{\|A_{1}-A_{2}\|,\|A_{1}-B_{2}\|\}+t\min\{\|B_{1}-A_{2}\|,\|B_{1}-B_{2}\|\}
(1t)dist(L1,L2)+tdist(L1,L2)\displaystyle\leq(1-t)\mathrm{dist}(L_{1},L_{2})+t\,\mathrm{dist}(L_{1},L_{2})
<ϵ.\displaystyle<\epsilon.

2 Approximating a quadratic Bézier curve

In this section we prove our main result, namely, that a quadratic Bézier curve cp,qc_{p,q} as in Definition 1.1 can be approximated through a family of Bézier-Bézout line segments given in Definition 1.5.

For integers p>3p>3 and 0q<p0\leq q<p, our next proposition will show how for a given 1ϵ12(p,q)1\leq\epsilon\leq\frac{1}{2}\|(p,q)\| and any pair of relatively prime numbers (r,s)(r,s) in a neighborhood of radius ϵ\epsilon and center (p,q)(p,q) one gets a real number 0<t0<10<t_{0}<1 such that both the distances from (r,s)\mathcal{B}(r,s) to αp,q(t0)\alpha_{p,q}(t_{0}) and from (s,r)\mathcal{B}(s,r) to βp,q(t0)\beta_{p,q}(t_{0}) are less to ϵ+1\epsilon+1. Since (r,s)\mathcal{B}(r,s) and (s,r)\mathcal{B}(s,r) are the endpoints of the Bézier-Bézout line Lr,sL_{r,s}, αp,q(t0)\alpha_{p,q}(t_{0}) and βp,q(t0)\beta_{p,q}(t_{0}) are the endpoints of γt0\gamma_{t_{0}}, and the Bézout quadratic cp,qc_{p,q} is the envelope of the family of lines γs\gamma_{s}, this proposition will prove to be crucial for our main result.

Proposition 2.1.

Consider integers p>3p>3 and 0q<p0\leq q<p and let 1ϵ12(p,q)1\leq\epsilon\leq\frac{1}{2}\|(p,q)\| be a real number. If (r,s)(r,s) is a pair of positive coprime numbers and (r,s)(p,q)ϵ\|(r,s)-(p,q)\|\leq\epsilon, then for 0<t0=1(r,s)(r,s)(r,s)2<10<t_{0}=1-\dfrac{\mathcal{B}(r,s)\cdot(r,s)}{\|(r,s)\|^{2}}<1, one has

(r,s)αp,q(t0)<ϵ+1 and (s,r)βp,q(t0)<ϵ+1,\|\mathcal{B}(r,s)-\alpha_{p,q}(t_{0})\|<\epsilon+1\hskip 8.5359pt\text{ and }\hskip 8.5359pt\|\mathcal{B}(s,r)-\beta_{p,q}(t_{0})\|<\epsilon+1,

where αp,q(t)=(1t)(p,q)\alpha_{p,q}(t)=(1-t)(p,q) and βp,q(t)=t(q,p)\beta_{p,q}(t)=t(q,p) are the parametrized lines given in Definition 1.1.

Proof.

Let rr and ss be an integers such that rr is relatively prime to pp, ss is relatively prime to qq and such that (r,s)(p,q)ϵ\|(r,s)-(p,q)\|\leq\epsilon. Suppose that (r,s)=(a,b)\mathcal{B}(r,s)=(a,b). Then, by Definition 1.2, we have the inequalities 0a<r0\leq a<r and 0<bs0<b\leq s. We obtain that the vector resolution of (r,s)\mathcal{B}(r,s) in the direction of (r,s)(r,s) has length less than (r,s)\|(r,s)\|, that is, 0<(r,s)(r,s)(r,s)<(r,s)0<\dfrac{\mathcal{B}(r,s)\cdot(r,s)}{\|(r,s)\|}<\|(r,s)\|. Thus 0<t0=1(r,s)(r,s)(r,s)2<10<t_{0}=1-\dfrac{\mathcal{B}(r,s)\cdot(r,s)}{\|(r,s)\|^{2}}<1.

By Proposition 1.4 (2) and (3), we have (r,s)(1t0)(r,s)=1r2+s2\|\mathcal{B}(r,s)-(1-t_{0})(r,s)\|=\dfrac{1}{\sqrt{r^{2}+s^{2}}}. Thus

(r,s)αp,q(t0)\displaystyle\|\mathcal{B}(r,s)-\alpha_{p,q}(t_{0})\| =(r,s)(1t0)(p,q)\displaystyle=\|\mathcal{B}(r,s)-(1-t_{0})(p,q)\|
(r,s)(1t0)(r,s)+(1t0)(r,s)(1t0)(p,q)\displaystyle\leq\|\mathcal{B}(r,s)-(1-t_{0})(r,s)\|+\|(1-t_{0})(r,s)-(1-t_{0})(p,q)\|
=1r2+s2+(1t0)(r,s)(p,q)\displaystyle=\dfrac{1}{\sqrt{r^{2}+s^{2}}}+(1-t_{0})\,\|(r,s)-(p,q)\|
<1p2+q2ϵ+ϵ\displaystyle<\dfrac{1}{\sqrt{p^{2}+q^{2}}-\epsilon}+\epsilon
<ϵ+1\displaystyle<\epsilon+1

On the other hand, using Proposition 1.3, we get (s,r)=(sb,ra)\mathcal{B}(s,r)=(s-b,r-a). By Proposition 1.4 (2) and (3) we also get (s,r)(1(r,s)(r,s)(r,s)2)(s,r)=1r2+s2\left\|\mathcal{B}(s,r)-\left(1-\dfrac{\mathcal{B}(r,s)\cdot(r,s)}{\|(r,s)\|^{2}}\right)(s,r)\right\|=\dfrac{1}{\sqrt{r^{2}+s^{2}}} . Thus

(s,r)βp,q(t0)\displaystyle\|\mathcal{B}(s,r)-\beta_{p,q}(t_{0})\| =(s,r)t0(q,p)\displaystyle=\|\mathcal{B}(s,r)-t_{0}(q,p)\|
(s,r)t0(s,r)+t0(s,r)t0(q,p)\displaystyle\leq\|\mathcal{B}(s,r)-t_{0}(s,r)\|+\|t_{0}(s,r)-t_{0}(q,p)\|
=(s,r)(1(r,s)(r,s)(r,s)2)(s,r)+t0(s,r)(q,p)\displaystyle=\left\|\mathcal{B}(s,r)-\left(1-\dfrac{\mathcal{B}(r,s)\cdot(r,s)}{\|(r,s)\|^{2}}\right)(s,r)\right\|+t_{0}\,\|(s,r)-(q,p)\|
<1p2+q2ϵ+ϵ\displaystyle<\dfrac{1}{\sqrt{p^{2}+q^{2}}-\epsilon}+\epsilon
<ϵ+1\displaystyle<\epsilon+1

Notice that the smaller the ϵ\epsilon is, the fewer the pairs (r,s)(r,s) of relatively prime numbers satisfying the condition of Proposition 2.1. For example, for p=300p=300, q=21q=21 and ϵ=1\epsilon=1, then (299,21)(299,21) is the only such pair. Therefore the size of ϵ\epsilon has to increase to obtain more coprime pairs within ϵ\epsilon of (p,q)(p,q); however, increasing the size of ϵ\epsilon will worsen our approximation of the Bézier quadratic.

The following theorem is our main result. It establishes the approximation of the Bézier quadratic curve cp,qc_{p,q} in Definition 1.1 through segments having as endpoints pairs of Bézout coefficients. More precisely, it establishes conditions for a point in the Bézier-Bézout segment Lr,sL_{r,s} to be close to a point of the quadratic Bézier curve cp,qc_{p,q}.

Theorem 2.2.

Let p>3p>3 and 0q<p0\leq q<p be integers and let 1<ϵ12(p,q)1<\epsilon\leq\frac{1}{2}\|(p,q)\| be a real number. Consider cp,qc_{p,q} the quadratic Bézier curve corresponding to P0=(p,q)P_{0}=(p,q), P1=(0,0)P_{1}=(0,0) and P2=(q,p)P_{2}=(q,p) defined in 1.1. If (r,s)(r,s) is a pair of positive coprime numbers and (r,s)(p,q)ϵ1\|(r,s)-(p,q)\|\leq\epsilon-1 then there exits 0<tr,s<10<t_{r,s}<1 such that

Lr,s(tr,s)cp,q(tr,s)<ϵ,\|L_{r,s}(t_{r,s})-c_{p,q}(t_{r,s})\|<\epsilon,

where Lr,s(t)L_{r,s}(t) is the Bézier-Bézout segment corresponding to (r,s)(r,s) defined in 1.5.

Proof.

Suppose that rr and ss are relatively prime numbers such that (r,s)(p,q)ϵ1\|(r,s)-(p,q)\|\leq\epsilon-1. By Proposition 2.1, there exists tr,st_{r,s} between 0 and 1 such that the distances from the points (r,s)\mathcal{B}(r,s) and (s,r)\mathcal{B}(s,r) to αp,q(tr,s)\alpha_{p,q}(t_{r,s}) and βp,q(tr,s)\beta_{p,q}(t_{r,s}), respectively, are both less than ϵ\epsilon. But the Bézier-Bézout line Lr,sL_{r,s} has end points (r,s)\mathcal{B}(r,s) and (s,r)\mathcal{B}(s,r), while the line γtr,s\gamma_{t_{r,s}} with endpoints on αp,q(tr,s)\alpha_{p,q}(t_{r,s}) and βp,q(tr,s)\beta_{p,q}(t_{r,s}) is tangent to the quadratic Bézier curve cp,qc_{p,q} at t=tr,st=t_{r,s}. So we conclude that dist(Lr,s,γtr,s)<ϵ\mathrm{dist}(L_{r,s},\gamma_{t_{r,s}})<\epsilon. The result now follows from Proposition 1.7. ∎

In Figure 1 we show some examples of approximately quadratic Bézier curves using ϵ=10\epsilon=10.

Refer to caption Refer to caption
Figure 1: Approximate Bézier quadratic curve cp,qc_{p,q} for (p,q)=(1000000,200000)(p,q)=(1000000,200000) and ϵ=10\epsilon=10 (left) and (p,q)=(1000000,600000)(p,q)=(1000000,600000) and ϵ=10\epsilon=10 (right).

References

  • [1] B.A. Itzá-Ortiz, R. López-Hernández and P. Miramontes. Digital Images Unveil Geometric Structures in Pairs of Relatively Prime Numbers. Math. Intelligencer. (2020) 42, 30–35.
  • [2] M. E. Mortenson. Mathematics for computer graphics applications. Industrial Press Inc., New York, 1999.
  • [3] G. Farin. Curves and Surfaces for Computer-Aided Geometric Design, 4th Edition. Academic Press, San Diego, 1997.
  • [4] I. Niven, H. S. Zuckerman and H. L. Montgomery. An introduction to the theory of numbers. 5th Edition. John Wiley & Sons, Inc., New York, 1991.
  • [5] R. Winkel. Generalized Bernstein Polynomials and Bézier Curves: An Application of Umbral Calculus to Computer Aided Geometric Design Adv. in Appl. Math. (2001) 27, 51–81.