1
$\begingroup$

I'm trying to fit integral (non-rational) quadratic Bézier curves to circular arcs.

$$ B(t) = (1 - t)^2 P_0 + 2 t (1 - t) P_1 + t^2 P_2 \tag{1} \label{1} $$

Let the angle of the arc be $2\theta$. Assuming the arc starts at

$$P_0 = (r, 0)$$

and ends at

$$P_2 = (r \cos 2\theta, r \sin 2\theta)$$

we intend to find the control point that lies along the angle bisector and thus would be $$ P_1 = (R \cos \theta, R \sin \theta)$$

for some $R$ which is to be solved for. We know the mid point of the arc

$$ B(\frac 1 2) = (r \cos \theta, r \sin \theta) \tag 2 \label 2 $$

Substituting the values of $P_0, P_1, P_2$ and $t = \frac 1 2$ in $\eqref{1}$ and equating values of the $x$ coordinate in $\eqref{1}$ and $\eqref{2}$, we have

$$r \cos \theta = \frac r 4 + \frac {R \cos \theta} 2 + \frac {r \cos 2\theta} 4 $$

Solving for $R$ and simplifying, I could bring it down to

$$ R = \frac {r (4 \cos \theta - \cos 2\theta - 1)} {2 \cos \theta} \tag 3 \label 3 $$

$$ R = r (2 - \frac {\cos 2\theta - 1} {2 \cos \theta}) \tag 4 \label 4 $$

But upon giving the $\eqref 3$ to Wolfrm Alpha it is able to simplify it to

$$ R = r ( 2 - \cos \theta ) $$

but not when $\eqref 4$ is given. I would like to know the identities that were used to simplify it so well; I am unable to arrive it after trying for quite sometime now.

$\endgroup$
1
$\begingroup$

$$\frac{4\cos\theta-\cos2\theta-1}{2\cos\theta}\neq2-\frac{\cos2\theta\color{red}{-}1}{2\cos\theta}$$

You've been sloppy about the minus sign on the right-hand side. In fact,

$$\frac{4\cos\theta-\cos2\theta-1}{2\cos\theta}=2-\frac{\cos2\theta\color{red}{+}1}{2\cos\theta}$$

$\endgroup$
  • $\begingroup$ Silly me! Looking at it for too long, I missed the forest for the trees :) Now the answer is obvious, thanks! $\endgroup$ – legends2k Jan 5 '16 at 8:27
  • $\begingroup$ @legends2k: you're welcome, though I think this was probably a case of missing the trees for the forest. $\endgroup$ – symplectomorphic Jan 5 '16 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.