1
$\begingroup$

How can I create the cubic bezier curve to (6,2) using control points (2,3.8) and (3.8,2)?

What I have tried:

I considered all the points as the control points P0=(2,3.8) P2=(6,2) P1=(3.8,2)

Consider the below equation: ∑ pi Bi,n (u)

where B is the basis function.

and

Bi,n(u)=nCiui(1-u)n-i

SO I derived the equation:

=P0B0,2(u)+P1B1,2(u)+P2B2,2(u)

But I am not able to get anything using this equation. ANy Help?

Edit:

if I consider only two control points i.e P0=(2,3.8) and P1=(3.8,2) then what is the use of point (6,2) and how we determine how much curly the path is?

$\endgroup$

1 Answer 1

1
$\begingroup$

A cubic bezier curve starting from point $P_0$, ending at point $P_3$ with two control points $P_1$ and $P_2$ is represented by the following,

$$B(t) = P_0(1-t)^3 + 3(1-t)^2tP_1 + 3(1-t)t^2P_2 + t^3P_3, \ \ t \in [0,1]$$

In your question, $P_1, P_2, P_3$ are given but $P_0$ is not satisfied. May be it is $(0,0)$. Please check the source of the question.

$\endgroup$
2
  • $\begingroup$ this equation is when there are 4 control points is given? @expiTTplz0 but In my question there are not 4 control points. $\endgroup$
    – Ankur_009
    Jul 9, 2017 at 10:18
  • $\begingroup$ Hey thanks @expiTTp1z0 , I got it. I have read wrong from the source. NeverMind thanks $\endgroup$
    – Ankur_009
    Jul 9, 2017 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .