1
$\begingroup$

I just started messing with Bezier Curves over the past couple days and I'm trying to get some of the basics down. I have this problem.

Consider a quadratic Bezier curve with control points (0, 0), (2, 2), and (4, 0). 
What are the coordinates of the curve at t = 0.3?

How would I go about solving this? Would I just use the quadratic Bezier curve formula and go from there? If anyone could walk me through this and explain, that would be much appreciated.

$\endgroup$
  • $\begingroup$ A quick Google search gives this formula from Wikipedia. It is just a matter of putting $P_0=(0,0), P_1=(2,2), P_2=(4,0)$. $\endgroup$ – cutculus May 27 '14 at 7:03
  • $\begingroup$ I think this en.wikipedia.org/wiki/De_Casteljau%27s_algorithm should help you. $\endgroup$ – pointer May 27 '14 at 7:24
  • $\begingroup$ I asked for someone to walk me through this for a reason. $\endgroup$ – Requiem May 27 '14 at 12:19
2
$\begingroup$

The curve point $\mathbf{C}(t)$ at parameter value $t$ is given by the standard formula $$ \mathbf{C}(t) = (1-t)^2\mathbf{P}_0 + 2t(1-t)\mathbf{P}_1 + t^2\mathbf{P}_2 $$ In our case, we have $\mathbf{P}_0 = (0,0)$, $\mathbf{P}_1 = (2,2)$, $\mathbf{P}_2 = (4,0)$, and we're interested in the parameter value $t = 0.3$. Plugging all these into the formula, we get \begin{align*} \mathbf{C}(0.3) &= (0.7)^2(0,0) + 2(0.3)(0.7)(2,2) + (0.3)^2(4,0) \\ &= (0.49)(0,0) + (0.42)(2,2) + (0.09)(4,0) \\ &= (1.2, 0.84) \end{align*} Note that $0.49+0.42+0.09=1$. This is significant.

You can get the same answer by using de Casteljau's algorithm. This says that $$ \mathbf{C}(t) = (1-t)\big[(1-t)\mathbf{P}_0 + t\mathbf{P}_1\big] + t\big[(1-t)\mathbf{P}_1 + t\mathbf{P}_2\big] $$ which has a nice geometric interpretation. Plugging $t=0.3$ into this, we get \begin{align*} \mathbf{C}(0.3) &= (0.7)\big[0.7\mathbf{P}_0 + 0.3\mathbf{P}_1\big] + (0.3)\big[0.7\mathbf{P}_1 + 0.3\mathbf{P}_2\big] \\ &= (0.7)(0.6,0.6) + (0.3)(2.6, 1.4) \\ &= (1.2, 0.84) \end{align*} You'll probably learn something if you draw a picture showing the original points $\mathbf{P}_0 = (0,0)$, $\mathbf{P}_1 = (2,2)$, $\mathbf{P}_2 = (4,0)$, the intermediate de Casteljau points $(0.6,0.6)$, and $(2.6, 1.4)$, and the final point $(1.2, 0.84)$.

$\endgroup$

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.