# Thread: Basic : Bezier Problems

1. ## Basic : Bezier Problems

Hi Mathematician of the world,

I am trying to do a basic plot of bezier curve and my curve does not seem to fit all the 4 points by using a bezier curve. It only fits the first point and end point. I guess that is what wikipedia says. If i would like to fit all points, what do i have to do? :
(9,6)
(11,9)
(13,9)
(14,13)

I have used formulas from website such as
p1 + (p2 - p1) * t = q1
p2 + (p3 - p2) * t = q2
p3 + (p4 - p3) * t = q3

q1 + (q2 - q1) * t = r1
q2 + (q3 - q2) * t = r2

p(x) = r1 + (r2 - r1) * t
p(y) = r1 + (r2 - r1) * t

Where
0 < t < 1 : Step of 0.1
p1 = position of point number 1, in this case 9
p2 = position of point number 2, in this case 11

Here I derived all of q1, q2, q3. (Total # of points for each q is 11. Therefore there is 33 points.)
Then i derived all of r1 & r2 (Total # of points for each r is 11. Therefore there is 22 points.
and then p(x), p(y) (Total # of points for each r is 11. Therefore there is 11 points.
I am not sure what is missing here but apparently I am not doing something right here.

Then i tried this formula, which is the same.

and I still couldn't get the real curvy points.

Hope to hear from experts!!!

2. ## Re: Basic : Bezier Problems

I'm not familiar with Bézier curves, but from what it says on wikipedia it's not going to go through the 4 points used to generate it. The 4 points act like guide points that determine the curve, but do not lie on it.

If you want any arbitrary curve that goes trough any four points, you could just use a fourth degree polynomial. (That extends to n points and an n degree polynomial.)
Did you need a particular type of curve? I'm not sure I understand your question (or its context).

3. ## Re: Basic : Bezier Problems

I want to use a Bezier or Catmull-ROM to go through the 4 points. And there is a reason for it to use a bezier curve.
The example i gave in the first post apparently, the bezier curve goes through the 1st and last point but not 3rd and 4th. And i guess it creates a convex hull. Therefore, I would like to know how to find the control point for point 2 & point 3, so that the curve goes through point 1, 2,3,4.

4. ## Re: Basic : Bezier Problems

$b: [0,1] \rightarrow \mathbb{A}^2$
$b(t) = (1 - t)^3 p_0 + 3 (1 - t)^2 t p_1 + 3 (1 - t) t^2 p_2 + t^3 p_3$

Given two points $q_1, q_2$ that line on curve $b$, and given $p_0, p_3$, find $p_1, p_2$.

If we let $b(t_1) = q_1, b(t_2) = q_2$, then
$q_1 = (1 - t_1)^3 p_0 + 3 (1 - t_1)^2 t_1 p_1 + 3 (1 - t_1) t_1^2 p_2 + t_1^3 p_3$
$q_2 = (1 - t_2)^3 p_0 + 3 (1 - t_2)^2 t_2 p_1 + 3 (1 - t_2) t_2^2 p_2 + t_2^3 p_3$

We now have two equations and two variables to solve for. The answers will be in terms of $p_0, q_1, t_1, q_2, t_2, p_3$, and I'm not sure how to go about deriving $t_1, t_2$ from $q_1, q_2$, but I hope it's a start.