Conic section and Bézier curves

202 Views Asked by At

I'd like to prove or disprove the following:

given a compact arc of a conic section $\mathcal{T} \subset \mathbb{R}^2$ such that for any $P \neq Q \in \mathcal{T}$ the tangent vectors $\tau_P, \tau_Q$ aren't parallel, then i can parametrize it using a quadratic Rational Bézier curve.

First of all I can find the three points: the endpoints of the arc and the intersection of the tangent lines at the endpoints (here i use the hypotesis making this intersection nonempty, as a counterexample we can pick a semicircumference). Then I can, without loss of generality, normalize the weights $w_0=w_2=1$. Now, how can I find $w_1$? I searched on NURBS,Farin, online and even on Stack Exchange. I didn't find a general case (only the one with circular arcs) and moreover it seems that you can only approximate an arc of conic section (why?).

Edit1: I found these slides https://public.vrac.iastate.edu/~oliver/courses/me625/week11.pdf but I don't understand nor the direct approach (because who grants me that of the three equations at least two are linearly independent) nor the geometric one (that one I just don't get it at all).

2

There are 2 best solutions below

1
On BEST ANSWER

We can do this from first principals. From the given conic arc, we can compute the Bézier control points $P_0, P_1, P_2$. And we know we can assume that the weights for the first and last control points are both $1$. So, then, the equation of the Bézier curve is: $$ C(t) = \frac {(1-t)^2P_0 + 2t(1-t)wP_1 + t^2P_2} {(1-t)^2+ 2t(1-t)w+ t^2} $$ We just need to find the middle weight, $w$.

Let $M = \tfrac12(P_0 + P_2)$ be the mid-point of the chord, and let $Q$ be the point where the conic intersects the line segment $MP_1$. After computing $Q$, we define $k = |MQ|/|MP_1|$. Then $$ Q = (1-k)M + kP_1 = \tfrac12(1-k)P_0 + kP_1 + \tfrac12(1-k)P_2. $$ Our strategy is to choose $w$ so that $C(\tfrac12) = Q$. Then the Bézier curve will pass through the points $P_1, Q, P_2$ and it will have the same end tangents as the original conic. A conic is fully determined by three points and two tangents, so if we accept that our rational quadratic curve is a conic, then it must be the same conic as the original one.

But $C(\tfrac12) = Q$ gives us $$ \frac {\tfrac14P_0 + \tfrac12wP_1 + \tfrac14P_2} {\tfrac14 + \tfrac12w+ \tfrac14} = \tfrac12(1-k)P_0 + kP_1 + \tfrac12(1-k)P_2. $$ Equating coefficients of $P_1$. We get $$ \frac{w}{1+w}= k $$ And rearranging gives $$ w = \frac{k}{1-k} $$

7
On

Choose a point $P$ on the conic and a line parameterized by $L(t)= A + tB$. For any given value of $t$, construct a line through $P$ and the line point $L(t)$. Since the conic is a curve of degree 2, this line must intersect the conic in two points. By construction, one of these points is $P$; call the other one $C(t)$. If you work through the algebra, you’ll find that $C(t)$ is a rational quadratic function of $t$.

Alternatively: use the geometry of the given conic to figure out its “shape factor”, $s$. You’ll have to find the intersection of the conic with the line joining its tangent intersection point $P_1$ and the mid-point $M$ of the chord $P_0P_2$. In other words, you have to find $s$ such that this intersection occurs at $(1-s)M + sP_1$. Then compute the weight of the middle control point from this shape factor: $w_1 = s/(1-s)$, as explained in the slides you found.