Skip to main content

Chapter 3 · 12 hours

Mathematical Representation of Curves

Practice questions

Practice questions and answers

10 exam-style questions on this chapter, written for this site from the official syllabus. We haven’t found past IOE papers for this subject yet; if you have some, share them in the community.

  • Practice · 6 marks

A line segment joins P1(1, 2, 3) and P2(5, -2, 9). (a) Write its parametric equation. (b) Find its length and direction cosines. (c) Find the point at u = 0.25. (d) Find the point where the line meets the plane z = 6.

Answer

(a) Parametric equation

P(u)=P1+u(P2−P1),0≤u≤1\mathbf P(u)=\mathbf P_1+u(\mathbf P_2-\mathbf P_1),\qquad 0\le u\le1

P2−P1=(4, −4, 6)\mathbf P_2-\mathbf P_1=(4,\,-4,\,6), so

x=1+4u,y=2−4u,z=3+6ux=1+4u,\qquad y=2-4u,\qquad z=3+6u

(b) Length and direction cosines

L=42+(−4)2+62=68=8.246L=\sqrt{4^2+(-4)^2+6^2}=\sqrt{68}=8.246 l=48.246=0.485,m=−48.246=−0.485,n=68.246=0.728l=\frac{4}{8.246}=0.485,\quad m=\frac{-4}{8.246}=-0.485,\quad n=\frac{6}{8.246}=0.728

Check: l2+m2+n2=0.235+0.235+0.529=1.0l^2+m^2+n^2=0.235+0.235+0.529=1.0.

(c) Point at u = 0.25

x=1+1=2,y=2−1=1,z=3+1.5=4.5x=1+1=2,\quad y=2-1=1,\quad z=3+1.5=4.5

Point (2, 1, 4.5)(2,\ 1,\ 4.5).

(d) Intersection with z = 6

3+6u=6⇒u=0.53+6u=6 \Rightarrow u=0.5, which lies in 0≤u≤10\le u\le1, so the segment does cut the plane.

x=1+4(0.5)=3,y=2−4(0.5)=0x=1+4(0.5)=3,\quad y=2-4(0.5)=0

Answer: L = 8.246; direction cosines (0.485, -0.485, 0.728); P(0.25) = (2, 1, 4.5); intersection with z = 6 at (3, 0, 6).

  • Practice · 6 marks

Write the parametric equations of (a) a circle of centre (2, 3) and radius 5, and (b) an ellipse of centre (1, 2) with semi-major axis 6 along X and semi-minor axis 3. Calculate points on the circle at 0, 60, 120 and 180 degrees, the tangent direction at 60 degrees, and the points of the ellipse at 0, 45 and 90 degrees.

Answer

(a) Circle

x=xc+Rcos⁡θ,y=yc+Rsin⁡θ,0≤θ≤2πx=x_c+R\cos\theta,\qquad y=y_c+R\sin\theta,\qquad 0\le\theta\le2\pi

With (xc,yc)=(2,3)(x_c,y_c)=(2,3), R=5R=5: x=2+5cos⁡θx=2+5\cos\theta, y=3+5sin⁡θy=3+5\sin\theta.

θ\thetaxxyy
0 deg7.0003.000
60 deg4.5007.330
120 deg-0.5007.330
180 deg-3.0003.000

Tangent: dxdθ=−5sin⁡θ, dydθ=5cos⁡θ\dfrac{dx}{d\theta}=-5\sin\theta,\ \dfrac{dy}{d\theta}=5\cos\theta. At 60∘60^\circ: (−4.330, 2.500)(-4.330,\ 2.500). Its length is 5, and it is perpendicular to the radius vector (2.5, 4.330)(2.5,\ 4.330) since the dot product is −10.83+10.83=0-10.83+10.83=0.

(b) Ellipse

x=xc+acos⁡θ,y=yc+bsin⁡θx=x_c+a\cos\theta,\qquad y=y_c+b\sin\theta

With a=6a=6, b=3b=3, centre (1,2)(1,2): x=1+6cos⁡θx=1+6\cos\theta, y=2+3sin⁡θy=2+3\sin\theta.

θ\thetaxxyy
0 deg7.0002.000
45 deg5.2434.121
90 deg1.0005.000

Check at 45 deg: (5.243−1)236+(4.121−2)29=0.5+0.5=1\dfrac{(5.243-1)^2}{36}+\dfrac{(4.121-2)^2}{9}=0.5+0.5=1.

The circle is the special case a=b=Ra=b=R. Note that θ\theta here is a parameter (eccentric angle), not the polar angle of the point of the ellipse.

Answer: circle points (7, 3), (4.5, 7.33), (-0.5, 7.33), (-3, 3); tangent at 60 deg = (-4.33, 2.5); ellipse points (7, 2), (5.243, 4.121), (1, 5).

  • Practice · 6 marks

Write the standard parametric equations of a parabola and a hyperbola. For the parabola y^2 = 12x, calculate the points for t = 0, 0.5, 1 and 2 and the slope of the tangent at t = 1. For the hyperbola x^2/9 - y^2/16 = 1, calculate points for theta = 0, 30 and 45 degrees.

Answer

Conic sections (circle, ellipse, parabola, hyperbola) are the analytic curves used in CAD. Their parametric forms with centre or vertex at the origin are:

  • Parabola y2=4axy^2=4ax: x=at2x=at^2, y=2aty=2at, −∞<t<∞-\infty<t<\infty.
  • Hyperbola x2a2−y2b2=1\dfrac{x^2}{a^2}-\dfrac{y^2}{b^2}=1: x=asec⁡θx=a\sec\theta, y=btan⁡θy=b\tan\theta (or x=acosh⁡tx=a\cosh t, y=bsinh⁡ty=b\sinh t).

Parabola y2=12xy^2=12x

4a=12⇒a=34a=12\Rightarrow a=3, so x=3t2x=3t^2, y=6ty=6t.

ttx=3t2x=3t^2y=6ty=6t
000
0.50.753
136
21212

Check at t=2t=2: y2=144=12×12y^2=144=12\times12.

Tangent slope: dydx=dy/dtdx/dt=66t=1t\dfrac{dy}{dx}=\dfrac{dy/dt}{dx/dt}=\dfrac{6}{6t}=\dfrac1t. At t=1t=1 the slope is 1 (45 deg).

Hyperbola with a=3a=3, b=4b=4

x=3sec⁡θx=3\sec\theta, y=4tan⁡θy=4\tan\theta.

θ\thetaxxyy
0 deg3.0000.000
30 deg3.4642.309
45 deg4.2434.000

Check at 45 deg: 18/9−16/16=2−1=118/9-16/16=2-1=1. The parameter θ\theta must stay away from 90∘90^\circ, where sec⁡θ\sec\theta is infinite; this gives only the right branch.

Answer: parabola points (0,0), (0.75,3), (3,6), (12,12), slope at t = 1 is 1; hyperbola points (3,0), (3.464,2.309), (4.243,4.0).

  • Practice · 8 marks

Derive the equation of a Hermite cubic curve in terms of its end points and end tangent vectors. Obtain the blending functions and write the equation in matrix form. State the properties of the curve.

Answer

A Hermite cubic segment is defined by two end points P0,P1\mathbf P_0,\mathbf P_1 and two end tangent vectors P0′,P1′\mathbf P_0',\mathbf P_1'.

Derivation

A cubic parametric curve is

P(u)=a3u3+a2u2+a1u+a0,0≤u≤1\mathbf P(u)=\mathbf a_3u^3+\mathbf a_2u^2+\mathbf a_1u+\mathbf a_0,\qquad 0\le u\le1

with tangent

P′(u)=3a3u2+2a2u+a1\mathbf P'(u)=3\mathbf a_3u^2+2\mathbf a_2u+\mathbf a_1

Apply the four boundary conditions:

P(0)=a0=P0P(1)=a3+a2+a1+a0=P1P′(0)=a1=P0′P′(1)=3a3+2a2+a1=P1′\begin{aligned} \mathbf P(0)&=\mathbf a_0=\mathbf P_0 \\ \mathbf P(1)&=\mathbf a_3+\mathbf a_2+\mathbf a_1+\mathbf a_0=\mathbf P_1 \\ \mathbf P'(0)&=\mathbf a_1=\mathbf P_0' \\ \mathbf P'(1)&=3\mathbf a_3+2\mathbf a_2+\mathbf a_1=\mathbf P_1' \end{aligned}

Solving:

a0=P0,a1=P0′a2=3(P1−P0)−2P0′−P1′a3=2(P0−P1)+P0′+P1′\begin{aligned} \mathbf a_0&=\mathbf P_0,\qquad \mathbf a_1=\mathbf P_0' \\ \mathbf a_2&=3(\mathbf P_1-\mathbf P_0)-2\mathbf P_0'-\mathbf P_1' \\ \mathbf a_3&=2(\mathbf P_0-\mathbf P_1)+\mathbf P_0'+\mathbf P_1' \end{aligned}

Substituting and collecting terms in P0,P1,P0′,P1′\mathbf P_0,\mathbf P_1,\mathbf P_0',\mathbf P_1':

P(u)=F1P0+F2P1+F3P0′+F4P1′\mathbf P(u)=F_1\mathbf P_0+F_2\mathbf P_1+F_3\mathbf P_0'+F_4\mathbf P_1'

Blending (Hermite) functions

F1=2u3−3u2+1F2=−2u3+3u2F3=u3−2u2+uF4=u3−u2\begin{aligned} F_1&=2u^3-3u^2+1 \\ F_2&=-2u^3+3u^2 \\ F_3&=u^3-2u^2+u \\ F_4&=u^3-u^2 \end{aligned}

Matrix form

P(u)=[u3u2u1][2−211−33−2−100101000][P0P1P0′P1′]\mathbf P(u)=\begin{bmatrix}u^3&u^2&u&1\end{bmatrix} \begin{bmatrix}2&-2&1&1\\-3&3&-2&-1\\0&0&1&0\\1&0&0&0\end{bmatrix} \begin{bmatrix}\mathbf P_0\\\mathbf P_1\\\mathbf P_0'\\\mathbf P_1'\end{bmatrix}

Properties

  • Passes through both end points (interpolates).
  • Tangent direction and magnitude at the ends are controlled; a larger tangent magnitude makes the curve stay longer in that direction.
  • F1+F2=1F_1+F_2=1 for every uu.
  • Two segments are joined with C1C^1 continuity by taking the same tangent at the common point.
  • Local control: changing one segment does not change the others.
  • Drawback: tangent vectors are not intuitive to the designer, which led to the Bezier form.
  • Practice · 8 marks

A Hermite cubic curve has end points P0 = (0, 0) and P1 = (4, 2), and end tangent vectors P0' = (4, 4) and P1' = (4, -4). Find the coordinates of the curve and its tangent vector at u = 0.25, 0.5 and 0.75. Verify the end conditions.

Answer

Formulae

P(u)=F1P0+F2P1+F3P0′+F4P1′\mathbf P(u)=F_1\mathbf P_0+F_2\mathbf P_1+F_3\mathbf P_0'+F_4\mathbf P_1'

with F1=2u3−3u2+1F_1=2u^3-3u^2+1, F2=−2u3+3u2F_2=-2u^3+3u^2, F3=u3−2u2+uF_3=u^3-2u^2+u, F4=u3−u2F_4=u^3-u^2. The tangent uses the derivatives F1′=6u2−6uF_1'=6u^2-6u, F2′=−6u2+6uF_2'=-6u^2+6u, F3′=3u2−4u+1F_3'=3u^2-4u+1, F4′=3u2−2uF_4'=3u^2-2u.

Since P0=(0,0)\mathbf P_0=(0,0):

P(u)=F2(4,2)+F3(4,4)+F4(4,−4)\mathbf P(u)=F_2(4,2)+F_3(4,4)+F_4(4,-4)

At u = 0.5

F2=0.5F_2=0.5, F3=0.125−0.5+0.5=0.125F_3=0.125-0.5+0.5=0.125, F4=0.125−0.25=−0.125F_4=0.125-0.25=-0.125.

x=0.5(4)+0.125(4)−0.125(4)=2.0y=0.5(2)+0.125(4)−0.125(−4)=1+0.5+0.5=2.0\begin{aligned} x&=0.5(4)+0.125(4)-0.125(4)=2.0 \\ y&=0.5(2)+0.125(4)-0.125(-4)=1+0.5+0.5=2.0 \end{aligned}

At u = 0.25

F2=−0.03125+0.1875=0.15625F_2=-0.03125+0.1875=0.15625; F3=0.015625−0.125+0.25=0.140625F_3=0.015625-0.125+0.25=0.140625; F4=0.015625−0.0625=−0.046875F_4=0.015625-0.0625=-0.046875.

x=0.15625(4)+0.140625(4)−0.046875(4)=0.625+0.5625−0.1875=1.000x=0.15625(4)+0.140625(4)-0.046875(4)=0.625+0.5625-0.1875=1.000

y=0.15625(2)+0.140625(4)+0.046875(4)=0.3125+0.5625+0.1875=1.0625y=0.15625(2)+0.140625(4)+0.046875(4)=0.3125+0.5625+0.1875=1.0625

At u = 0.75

F2=−0.84375+1.6875=0.84375F_2=-0.84375+1.6875=0.84375; F3=0.421875−1.125+0.75=0.046875F_3=0.421875-1.125+0.75=0.046875; F4=0.421875−0.5625=−0.140625F_4=0.421875-0.5625=-0.140625.

x=0.84375(4)+0.046875(4)−0.140625(4)=3.000x=0.84375(4)+0.046875(4)-0.140625(4)=3.000

y=0.84375(2)+0.046875(4)+0.140625(4)=1.6875+0.1875+0.5625=2.4375y=0.84375(2)+0.046875(4)+0.140625(4)=1.6875+0.1875+0.5625=2.4375

Tangent vectors

Using P′(u)=F2′(4,2)+F3′(4,4)+F4′(4,−4)\mathbf P'(u)=F_2'(4,2)+F_3'(4,4)+F_4'(4,-4):

uuxxyyPx′P'_xPy′P'_y
00044
0.251.0001.06254.004.25
0.502.0002.0004.003.00
0.753.0002.43754.000.25
1424-4

Example at u=0.5u=0.5: F2′=1.5F_2'=1.5, F3′=−0.25F_3'=-0.25, F4′=−0.25F_4'=-0.25, so Py′=1.5(2)+(−0.25)(4)+(−0.25)(−4)=3−1+1=3P'_y=1.5(2)+(-0.25)(4)+(-0.25)(-4)=3-1+1=3 and Px′=4(1.5−0.25−0.25)=4P'_x=4(1.5-0.25-0.25)=4.

End conditions

At u=0u=0: F1=1F_1=1, others 0, so P=(0,0)\mathbf P=(0,0) and P′=(4,4)\mathbf P'=(4,4). At u=1u=1: F2=1F_2=1, so P=(4,2)\mathbf P=(4,2) and P′=(4,−4)\mathbf P'=(4,-4). Both are satisfied.

Answer: P(0.25) = (1.00, 1.0625), P(0.5) = (2.00, 2.00), P(0.75) = (3.00, 2.4375); tangents (4, 4.25), (4, 3), (4, 0.25).

  • Practice · 6 marks

Define a Bezier curve. Write the general equation with Bernstein basis functions and explain the main properties of Bezier curves. What are the limitations of Bezier curves?

Answer

A Bezier curve is a parametric curve defined by a set of control points forming a control polygon. The curve approximates the polygon: it starts at the first and ends at the last control point, and is pulled towards the other points. It was developed by Pierre Bezier at Renault.

Equation

For n+1n+1 control points B0,…,Bn\mathbf B_0,\dots,\mathbf B_n (degree nn):

P(u)=∑i=0nBi Jn,i(u),0≤u≤1\mathbf P(u)=\sum_{i=0}^{n}\mathbf B_i\,J_{n,i}(u),\qquad 0\le u\le1

with the Bernstein basis

Jn,i(u)=(ni)ui(1−u)n−i=n!i!(n−i)!ui(1−u)n−iJ_{n,i}(u)=\binom{n}{i}u^i(1-u)^{n-i}=\frac{n!}{i!(n-i)!}u^i(1-u)^{n-i}

For a cubic (n=3n=3): J3,0=(1−u)3J_{3,0}=(1-u)^3, J3,1=3u(1−u)2J_{3,1}=3u(1-u)^2, J3,2=3u2(1−u)J_{3,2}=3u^2(1-u), J3,3=u3J_{3,3}=u^3.

Properties

  1. The curve is of degree one less than the number of control points.
  2. It passes through the first and last control points: P(0)=B0\mathbf P(0)=\mathbf B_0, P(1)=Bn\mathbf P(1)=\mathbf B_n.
  3. End tangents lie along the first and last polygon sides: P′(0)=n(B1−B0)\mathbf P'(0)=n(\mathbf B_1-\mathbf B_0), P′(1)=n(Bn−Bn−1)\mathbf P'(1)=n(\mathbf B_n-\mathbf B_{n-1}).
  4. Convex hull property: the curve lies inside the convex hull of its control points, because the basis functions are non-negative and sum to 1.
  5. Variation diminishing: the curve does not cross any straight line more times than the control polygon does.
  6. Symmetry: reversing the order of the points gives the same curve.
  7. Invariant under affine transformation: transform the control points and redraw.
  8. Global control: moving one control point changes the whole curve.

Limitations

  • Degree rises with the number of points, so many points give a high-degree, costly curve.
  • No local control.
  • Cannot represent exact conics such as a circle (rational Bezier is required).
  • Joining segments with C1C^1 continuity needs the three points around the joint to be collinear.
  • Practice · 6 marks

A cubic Bezier curve has control points B0 = (0, 0), B1 = (1, 3), B2 = (4, 4) and B3 = (5, 0). Calculate the points on the curve at u = 0.25 and u = 0.5 and the tangent vectors at the two ends. Verify the u = 0.5 point by the de Casteljau method.

Answer

Equation

P(u)=(1−u)3B0+3u(1−u)2B1+3u2(1−u)B2+u3B3\mathbf P(u)=(1-u)^3\mathbf B_0+3u(1-u)^2\mathbf B_1+3u^2(1-u)\mathbf B_2+u^3\mathbf B_3

At u = 0.5

Weights: 0.125, 0.375, 0.375, 0.1250.125,\ 0.375,\ 0.375,\ 0.125.

x=0.125(0)+0.375(1)+0.375(4)+0.125(5)=0.375+1.5+0.625=2.5y=0.125(0)+0.375(3)+0.375(4)+0.125(0)=1.125+1.5=2.625\begin{aligned} x&=0.125(0)+0.375(1)+0.375(4)+0.125(5)=0.375+1.5+0.625=2.5 \\ y&=0.125(0)+0.375(3)+0.375(4)+0.125(0)=1.125+1.5=2.625 \end{aligned}

At u = 0.25

Weights: (0.75)3=0.421875(0.75)^3=0.421875; 3(0.25)(0.75)2=0.4218753(0.25)(0.75)^2=0.421875; 3(0.25)2(0.75)=0.1406253(0.25)^2(0.75)=0.140625; (0.25)3=0.015625(0.25)^3=0.015625.

x=0.421875(1)+0.140625(4)+0.015625(5)=0.421875+0.5625+0.078125=1.0625y=0.421875(3)+0.140625(4)=1.265625+0.5625=1.828125\begin{aligned} x&=0.421875(1)+0.140625(4)+0.015625(5)=0.421875+0.5625+0.078125=1.0625 \\ y&=0.421875(3)+0.140625(4)=1.265625+0.5625=1.828125 \end{aligned}

End tangents

P′(0)=3(B1−B0)=3(1,3)=(3, 9),P′(1)=3(B3−B2)=3(1,−4)=(3, −12)\mathbf P'(0)=3(\mathbf B_1-\mathbf B_0)=3(1,3)=(3,\ 9),\qquad \mathbf P'(1)=3(\mathbf B_3-\mathbf B_2)=3(1,-4)=(3,\ -12)

De Casteljau check at u = 0.5

Repeated mid-points:

LevelPoints
0(0,0), (1,3), (4,4), (5,0)
1(0.5,1.5), (2.5,3.5), (4.5,2)
2(1.5,2.5), (3.5,2.75)
3(2.5, 2.625)

The result (2.5, 2.625)(2.5,\ 2.625) equals the formula value.

Answer: P(0.25) = (1.0625, 1.828); P(0.5) = (2.5, 2.625); P'(0) = (3, 9); P'(1) = (3, -12).

  • Practice · 5 marks

What is a B-spline curve? Differentiate between a B-spline curve and a Bezier curve. Explain the terms control points, knot vector, degree and order, and state the advantages of B-splines.

Answer

A B-spline curve is a piecewise polynomial parametric curve defined by control points and B-spline basis functions. It is a generalisation of the Bezier curve and removes its two main weaknesses: global control and the link between the number of points and the degree.

Equation

P(u)=∑i=0nBi Ni,k(u)\mathbf P(u)=\sum_{i=0}^{n}\mathbf B_i\,N_{i,k}(u)

Ni,kN_{i,k} are basis functions of order kk (degree k−1k-1) given by the Cox-de Boor recursion over the knot vector {t0,t1,… }\{t_0,t_1,\dots\}.

Terms

  • Control points Bi\mathbf B_i: vertices of the control polygon; the curve is attracted to them but usually does not pass through them.
  • Knot vector: non-decreasing parameter values where the polynomial pieces join. Number of knots =n+k+1=n+k+1 for n+1n+1 points. Uniform, open-uniform (end knots repeated kk times) and non-uniform vectors are used.
  • Degree: polynomial degree of each segment (cubic is common); order == degree +1+1.

Difference

PointBezierB-spline
Degreenn = points −1-1 (fixed)Chosen independently (k−1k-1)
ControlGlobalLocal
SegmentsOne polynomialMany joined polynomials
ContinuityNeeds extra conditions to joinCk−2C^{k-2} automatic
Passes through end pointsAlwaysOnly for open knot vector
Extra parameterNoneKnot vector
ComputationSimpleHigher
Special caseBezier is a B-spline with k=n+1k=n+1 and no interior knots

Advantages

  1. Local control: moving one point changes only kk segments.
  2. Degree stays low (cubic) for any number of points.
  3. High continuity (C2C^2 for cubic) at joints.
  4. Convex hull and variation diminishing properties.
  5. NURBS (rational B-splines) can represent exact conics and free-form curves in one form.
  • Practice · 8 marks

A uniform cubic B-spline segment is defined by four control points P0 = (1, 1), P1 = (2, 4), P2 = (5, 5) and P3 = (7, 2). Write the matrix form and calculate the points on the segment at u = 0, 0.5 and 1. Also find the tangent at u = 0 and u = 1.

Answer

Matrix form

For one uniform cubic segment (0≤u≤10\le u\le1):

P(u)=16[u3u2u1][−13−313−630−30301410][P0P1P2P3]\mathbf P(u)=\frac16\begin{bmatrix}u^3&u^2&u&1\end{bmatrix} \begin{bmatrix}-1&3&-3&1\\3&-6&3&0\\-3&0&3&0\\1&4&1&0\end{bmatrix} \begin{bmatrix}\mathbf P_0\\\mathbf P_1\\\mathbf P_2\\\mathbf P_3\end{bmatrix}

This is equivalent to the blending functions

N0=16(1−u)3N1=16(3u3−6u2+4)N2=16(−3u3+3u2+3u+1)N3=16u3\begin{aligned} N_0&=\tfrac16(1-u)^3 \\ N_1&=\tfrac16(3u^3-6u^2+4) \\ N_2&=\tfrac16(-3u^3+3u^2+3u+1) \\ N_3&=\tfrac16u^3 \end{aligned}

Weights

uuN0N_0N1N_1N2N_2N3N_3Sum
01/64/61/601
0.50.02080.47920.47920.02081
101/64/61/61

Points

At u=0u=0:

x=1+4(2)+56=146=2.333,y=1+4(4)+56=226=3.667x=\frac{1+4(2)+5}{6}=\frac{14}{6}=2.333,\qquad y=\frac{1+4(4)+5}{6}=\frac{22}{6}=3.667

At u=0.5u=0.5:

x=0.0208(1)+0.4792(2)+0.4792(5)+0.0208(7)=3.521y=0.0208(1)+0.4792(4)+0.4792(5)+0.0208(2)=4.375\begin{aligned} x&=0.0208(1)+0.4792(2)+0.4792(5)+0.0208(7)=3.521 \\ y&=0.0208(1)+0.4792(4)+0.4792(5)+0.0208(2)=4.375 \end{aligned}

At u=1u=1:

x=2+4(5)+76=4.833,y=4+4(5)+26=4.333x=\frac{2+4(5)+7}{6}=4.833,\qquad y=\frac{4+4(5)+2}{6}=4.333

Tangents

P′(0)=12(P2−P0)=12(4,4)=(2, 2)\mathbf P'(0)=\tfrac12(\mathbf P_2-\mathbf P_0)=\tfrac12(4,4)=(2,\ 2)

P′(1)=12(P3−P1)=12(5,−2)=(2.5, −1)\mathbf P'(1)=\tfrac12(\mathbf P_3-\mathbf P_1)=\tfrac12(5,-2)=(2.5,\ -1)

The curve does not touch the control points; it starts at (2.333,3.667)(2.333, 3.667), a weighted average of P0,P1,P2\mathbf P_0,\mathbf P_1,\mathbf P_2.

Answer: P(0) = (2.333, 3.667); P(0.5) = (3.521, 4.375); P(1) = (4.833, 4.333); tangents (2, 2) at u = 0 and (2.5, -1) at u = 1.

  • Practice · 6 marks

A Hermite cubic has P0 = (0, 0), P1 = (6, 0), P0' = (3, 6) and P1' = (3, -6). Derive the relation between Hermite and cubic Bezier data and find the Bezier control points. Hence calculate the curve point at u = 0.5 and u = 0.25.

Answer

Relation between the forms

A cubic Bezier curve with control points B0..B3\mathbf B_0..\mathbf B_3 has end points P(0)=B0\mathbf P(0)=\mathbf B_0, P(1)=B3\mathbf P(1)=\mathbf B_3 and end tangents

P′(0)=3(B1−B0),P′(1)=3(B3−B2)\mathbf P'(0)=3(\mathbf B_1-\mathbf B_0),\qquad \mathbf P'(1)=3(\mathbf B_3-\mathbf B_2)

If this curve is to equal the Hermite curve, the end conditions must be identical:

B0=P0,B3=P1,B1=P0+13P0′,B2=P1−13P1′\mathbf B_0=\mathbf P_0,\quad \mathbf B_3=\mathbf P_1,\quad \mathbf B_1=\mathbf P_0+\tfrac13\mathbf P_0',\quad \mathbf B_2=\mathbf P_1-\tfrac13\mathbf P_1'

Both are cubics with the same four end conditions, so they are the same curve.

Control points

B0=(0,0)B1=(0,0)+13(3,6)=(1, 2)B2=(6,0)−13(3,−6)=(5, 2)B3=(6,0)\begin{aligned} \mathbf B_0&=(0,0) \\ \mathbf B_1&=(0,0)+\tfrac13(3,6)=(1,\ 2) \\ \mathbf B_2&=(6,0)-\tfrac13(3,-6)=(5,\ 2) \\ \mathbf B_3&=(6,0) \end{aligned}

Point at u = 0.5

Weights 0.125,0.375,0.375,0.1250.125, 0.375, 0.375, 0.125:

x=0.375(1)+0.375(5)+0.125(6)=3.0,y=0.375(2)+0.375(2)=1.5x=0.375(1)+0.375(5)+0.125(6)=3.0,\qquad y=0.375(2)+0.375(2)=1.5

Point at u = 0.25

Weights 0.421875, 0.421875, 0.140625, 0.0156250.421875,\ 0.421875,\ 0.140625,\ 0.015625:

x=0.421875(1)+0.140625(5)+0.015625(6)=1.2188y=0.421875(2)+0.140625(2)=1.125\begin{aligned} x&=0.421875(1)+0.140625(5)+0.015625(6)=1.2188 \\ y&=0.421875(2)+0.140625(2)=1.125 \end{aligned}

Answer: Bezier control points (0,0), (1,2), (5,2), (6,0); P(0.5) = (3.0, 1.5); P(0.25) = (1.219, 1.125).

Written from the official syllabus. Questions and answers are written for this site; check them against your class notes.

Chapter titles and hours from the IOE syllabus ↗