0
2.9kviews
Bezier Curves : -
1 Answer
0
17views

Bezier curve is discovered by the French engineer Pierre Bézier. These curves can be generated under the control of other points. Approximate tangents by using control points are used to generate curve. The Bezier curve can be represented mathematically as

enter image description here

Where $P_i$ is the set of points and $Bin(t)$ represents the Bernstein polynomials which are given by −

enter image description here

Where n is the polynomial degree, i is the index, and t is the variable.

The simplest Bézier curve is the straight line from the point $P_0P_0$ to $P_1P_1$. A quadratic Bezier curve is determined by three control points. A cubic Bezier curve is determined by four control points.

enter image description here

Properties of Bezier Curves

Bezier curves have the following properties −

• They generally follow the shape of the control polygon, which consists of the segments joining the control points.

• They always pass through the first and last control points.

• They are contained in the convex hull of their defining control points.

• The degree of the polynomial defining the curve segment is one less that the number of defining polygon point. Therefore, for 4 control points, the degree of the polynomial is 3, i.e. cubic polynomial.

• A Bezier curve generally follows the shape of the defining polygon.

• The direction of the tangent vector at the end points is same as that of the vector determined by first and last segments.

• The convex hull property for a Bezier curve ensures that the polynomial smoothly follows the control points.

• No straight line intersects a Bezier curve more times than it intersects its control polygon.

• They are invariant under an affine transformation.

• Bezier curves exhibit global control means moving a control point alters the shape of the whole curve.

• A given Bezier curve can be subdivided at a point t=t0 into two Bezier segments which join together at the point corresponding to the parameter value $t=t_0$


$P(t)=\sum_{i=0}^{n} \mathrm{P}_{\mathrm{i}} \mathrm{B}_{\mathrm{i}}, \mathrm{n}(\mathrm{t})$

Where, $\mathrm{B}_{\mathrm{i}}, \mathrm{n}(\mathrm{t})=\mathrm{C}_{\mathrm{n}, \mathrm{i}} \mathrm{t}^{\mathrm{i}}(1-\mathrm{t})^{\mathrm{n}-\mathrm{i}}$

$\mathrm{C}_{\mathrm{n}, \mathrm{i}}=\frac{\mathrm{n} !}{\mathrm{i} !(\mathrm{n}-\mathrm{i}) !}$

Cubic Curve:

$\mathrm{N}=3 |$ Points $P_{0}, P_{1}, P_{2}, P_{3}$ $P(t)=P_{0} B_{0,3}(t)+P_{1} B_{1,3}(t)+P_{2} B_{2,3}(t)+P_{3} B_{3,3}(t)$ $\quad=P_{0} C_{0,3}(1-t)^{3}+P_{1} C_{1,3} t(1-t)^{2}+P_{2} C_{2,3} t^{2}(1-t)+P_{3} C_{3,3} t^{3}$

$P(t)=P_{0}(1-t)^{3}+3 P_{1}(1-t)^{2} t+3 P_{2}(1-t) t^{2}+P_{3} t^{3}$

Use formula, $(a+b)^{3}=a^{3}+3 a^{2} b+3 a b^{2}+b^{3}$ for above equation

Quadratic Curve:

$P(t)=P_{0}(1-t)^{2}+2 P_{1}(1-t) t+P_{2} t^{2}$

$(1-t) \downarrow$

(t) $\uparrow$


Find the degree of Bezier Curve controlled by 3 -points (4,2), (0,0) and (2,8) . Also find the eqn of Bezier curve is parametric format.

Solution:

No. of points are k = 3,

Degree of polynomial $(\mathrm{n})=\mathrm{k}-1=2$

$\therefore$ Quadratic Curve

$P(t)=P_{0}(1-t)^{2}+2 P_{1}(1-t) t+P_{2} t^{2}$

$P_{x}=4(1-t)^{2}+2(0)(1-t) t+2 t^{2}$

$P_{x}=4(1-t)^{2}+2 t^{2}$

$\therefore P_{x}=4-8 t+6 t^{2}$

$P_{y}=2(1-t)^{2}+2(0)(1-t) t+8 t^{2}$

$P_{y}=2(1-t)^{2}+8 t^{2}$

$P_{y}=2\left[1-2 t+t^{2}\right]+8 t^{2}=2-4 t+2 t^{2}+8 t^{2}$

$\therefore P_{y}=2-4 t+10 t^{2}$


Find the degree of Bezier Curve controlled by 3 -points (4,2), (0,0) and (2,8) . Also find the eqn of Bezier curve is parametric format.

Solution:

No. of points are k = 3,

Degree of polynomial $(\mathrm{n})=\mathrm{k}-1=2$

$\therefore$ Quadratic Curve

$P(t)=P_{0}(1-t)^{2}+2 P_{1}(1-t) t+P_{2} t^{2}$

$P_{x}=4(1-t)^{2}+2(0)(1-t) t+2 t^{2}$

$P_{x}=4(1-t)^{2}+2 t^{2}$

$\therefore P_{x}=4-8 t+6 t^{2}$

$P_{y}=2(1-t)^{2}+2(0)(1-t) t+8 t^{2}$

$P_{y}=2(1-t)^{2}+8 t^{2}$

$P_{y}=2\left[1-2 t+t^{2}\right]+8 t^{2}=2-4 t+2 t^{2}+8 t^{2}$

$\therefore P_{y}=2-4 t+10 t^{2}$


Co-ordinates of 4-data points $P_0, P_1, P_2, P_3$ are (2, 2, 0), (2, 3, 0), (3, 3, 0) and (3, 2, 0).

Find the eqn of Bezier curve and determine co-ordinate of points on the curve for t = 0, 0.25, 0.5, 0.75 ,1

Solution:

No. of points = 4 = k

Degree of curve $=(\mathrm{n})=\mathrm{k}-1=3$

$\therefore$ Cubic Curve

$P(t)=P_{0}(1-t)^{3}+3 P_{1}(1-t)^{2} t+3 P_{2}(1-t) t^{2}+P_{3} t^{3}$

$P_{0}=\left[\begin{array}{ccc}{2} & {2} & {0}\end{array}\right]$

$P_{1}=\left[\begin{array}{ccc}{2} & {3} & {0}\end{array}\right]$

$P_{2}=\left[\begin{array}{ccc}{2} & {3} & {0}\end{array}\right]$

$P_{3}=\left[\begin{array}{lll}{3} & {2} & {0}\end{array}\right]$

$\begin{aligned} P_{x} &=2(1-t)^{3}+3(2)(1-t)^{2} t+3(3)(1-t) t^{2}+3 t^{3} \\ &=2(1-t)^{3}+6(1-t)^{2} t+9(1-t) t^{2}+3 t^{3} \\ &=2\left(1-3 t+3 t^{2}-t^{3}\right)+6\left(1-2 t+t^{2}\right) t+9 t^{2}-9 t^{3}+3 t^{3} \\ &=2-6 t+6 t^{2}-2 t^{3}+ 6 t-12 t^{2}+6 t^{3}+9 t^{2}-9 t^{3}+3 t^{3} \\ \therefore & P_{x}=2+3 t^{2}-2 t^{3} \end{aligned}$

$\begin{aligned} P_{y} &=2(1-t)^{3}+3(3)(1-t)^{2} t+3(3)(1-t) t^{2}+2 t^{3} \\ &=2\left[1-3 t+3 t^{2}-t^{3}\right]+9\left[1-2 t+t^{2}\right] t+9\left[t^{2}-t^{3}\right]+2 t^{3} \\ &=2-6 t+6 t^{2}-2 t^{3}+\left[9-18 t+9 t^{2}\right] t+9 t^{2}-9 t^{3}+2 t^{3} \\ P_{y} &=2-6 t+6 t^{2}-2 t^{3}+9 t-18 t^{2}+9 t^{3}+9 t^{2}-7 t^{3} \\ \therefore & P_{y}=2+3 t-3 t^{2} \end{aligned}$

$\begin{array}{|c|c|c|c|c|c|}\hline t \rightarrow & {0} & {0.25} & {0.5} & {0.75} & {1} \\ \hline P_{x} & {2} & {2.15625} & {2.5} & {2.844} & {3} \\ \hline P_y & {2} & {2.562} & {2.75} & {2.562} & {2} \\ \hline\end{array}$


A Cubic Bezier curve is defined as (20, 20) (60, 80) (120, 100) & (150, 30). Find the eqn of curve and its mid-point also find slope of curve at mid-point.

Solution:

No. of points = 4 = k

Degree of curve $=(\mathrm{n})=\mathrm{k}-1=4-1=3$

$\therefore$ Cubic Curve

$P(t)=P_{0}(1-t)^{3}+3 P_{1}(1-t)^{2} t+3 P_{2}(1-t) t^{2}+P_{3} t^{3}$

$P_{0}=\left[\begin{array}{ll}{20} & {20}\end{array}\right]$

$P_{1}=\left[\begin{array}{ll}{60} & {80}\end{array}\right]$

$P_{2}=\left[\begin{array}{ll}{120} & {100}\end{array}\right]$

$P_{3}=\left[\begin{array}{ll}{150} & {30}\end{array}\right]$

$\begin{aligned} P_{x} &=20(1-t)^{3}+3(60)(1-t)^{2} t+3(120)(1-t) t^{2}+150 t^{3} \\ &=20\left(1-3 t+3 t^{2}-t^{3}\right)+180\left(1-2 t+t^{2}\right) t+360\left(t^{2}-t^{3}\right)+150 t^{3} \end{aligned}$

$=20-60 t+60 t^{2}-20 t^{3}+180 t-360 t^{2}+180 t^{3}+360 t^{2}-360 t^{3}+150 t^{3}$

$\therefore P_{x}=20+120 t+60 t^{2}-50 t^{3}$

$\begin{aligned} P_{y} &=20\left(1-3 t+3 t^{2}-t^{3}\right)+240\left(1-2 t+t^{2}\right) t+300\left(t^{2}-t^{3}\right)+30 t^{3} \\ &=20-60 t+60 t^{2}-20 t^{3}+240 t-480 t^{2}+240 t^{3}+300 t^{2}-300 t^{3}+30 t^{3} \end{aligned}$

$\therefore P_{y}=20+180 t-120 t^{2}-50 t^{3}$

For Mid point, $\mathrm{t}=0.5$

$P_{x}=88.75$

$P_{y}=73.75$

Slope $=\frac{d{y}}{d{x}}$

$\frac{d{y}}{d{x}}=\frac{0+120+120 t-150 t^{2}}{0+180-240 t-150 t^{2}}$

Slope $=\frac{d y}{d{x}}=\frac{\frac{d y}{d{t}}}{d{t}}=\frac{180-240 t-150 t^{2}}{120+120 t-150 t^{2}}$

$\therefore$ Slope $=0.15789$

Please log in to add an answer.