ME 714 Computer-integrated Manufacturing Assignment 2 solution

\$25.00

Original Work ?

Description

5/5 - (1 vote)

1. Determine the equation of the parametric cubic spline passing through points A and B, [4]
A = (2,5), Slope vector at A is at 900 w.r.t. the X-axis and has magnitude = 1,
B = (6,0), Slope vector at B is at 450 w.r.t. the X-axis and has magnitude = 1.
What is the slope of this curve at t = 0.5?

2. Matrix representation of the parametric cubic spline is given as follows, [3]
P(t) = [t][MH][GH] = h
t
3
t
2
t 1
i

2 −2 1 1
−3 3 −2 −1
0 0 1 0
1 0 0 0

P(0)
P(1)
P
0
(0)
P
0
(1)

(1)
where, [MH] is the Hermite matrix and [GH] is geometric coefficient matrix. Derive a similar
matrix representation for the Bezier curve (i.e., B(t) = [t][MB][V ]) given four control points
(V0, V1, V2, V3).

3. Write a function in MATLAB or Python to plot the Bezier curve given control points (V0, V1, V2, V3). [10]
The input to the function will be a four by two matrix [V],
[V ] =

Xv0 Yv0
Xv1 Yv1
Xv2 Yv2
Xv3 Yv3

(2)
where, Xvi
and Yvi
are the x- and y-coordinates of the control point Vi
.

text file named ’LastName-FirstName-Bezier.txt’ (e.g., Mujumdar-Soham-Bezier.txt) along
with MATLAB 2020/Python 3.8. Use atleast 100 points on the curve to plot the curve.)

4. Use your code from Q. 3 to plot the Bezier curves for each of the following sets of control points, [8]
• V0 = (0, 0), V1 = (3, 4), V2 = (5, 2), V3 = (6, 0)
• V0 = (6, 0), V1 = (5, 2), V2 = (3, 4), V3 = (0, 0)
• V0 = (0, 0), V1 = (5, 2), V2 = (3, 4), V3 = (6, 0)
• V0 = (0, 0), V1 = (3, 4), V2 = (5, −2), V3 = (6, 0)

Based on the plots, comment on what happens to the curve when (a) the order of the control points
is changed, and (b) one of the control points is moved.

5. Find (x,y,z) if the two Bezier curve segments (B1 and B2) passing through following sets of [5]
control points are required to be C
continuous at the common point D.
• B1 : A = (2, 3, 4), B = (3, 1, 5), C = (x, y, z), D = (3, 4, 3)
• B2 : D = (3, 4, 3), E = (2, 6, 0), F = (5, 7, 5), G = (5, 2, 3)