Practical Assignment Problem
Problem 1: Develop a MATLAB code to perform the following transformations on a trapezoid
defined by the points (6, 1) (8, 1), (10, 4) and (3, 4).
a) Translation of all the points by (5, 5) in x and y directions.
b) Rotate the hexagon about z-axis by 90o
c) Reflect the whole body about y-axis.
d) Apply all the above transformations in the same order (a) to (c).
Problem 2: The vertices of a block with one corner removed are given as A( 2, 1, 2), B (3,
1,2), C (3, 1.5, 2), D (2.5, 2, 2), E (2, 2, 2), F (2, 1, 1), G (3, 1, 1), H (3, 2, 1), I (2, 2, 1), J (3,2,
1.5). Perform the following transformations on the body shown in the figure below.
a) Rotate the body by 900 about z-axis.
b) Orthographic projection of the body on x-y plane (z = 0).
c) Orthographic projection of the body on y-z plane (x = 0)
Problem 3: Generate a normalized piecewise cubic spline curve through the four points with
position vectors P1 [1, 1], P2 [2, 3], P3 [4, -2], P4 [5, 1 ] with tangent vectors P1 ′ = [0 1] and
P4′ = [−1 − 1]. Take 50 points on each segment.
Hermite basis functions or blending functions
Problem 4: Write a script file in MATLAB to generate an open uniform knot vector for a kth
order B-spline curve with defining polygon having n + 1 number of polygon vertices. Include
two examples in the output for
(a) n = 4, k = 2
(b) n = 3, k = 4;