Question: 2. In this question you are going to apply linear transformations to a two dimensional irregular polygon. To attempt this question, you will have to
2. In this question you are going to apply linear transformations to a two dimensional irregular polygon. To attempt this question, you will have to research MATLAB's polygon. You must provide your MATLAB code and all resulting figures for each of the questions below. (a) (1 mark) Create a matrix V with two columns in which every row represents a vertex of an irregular polygon. For example V= [0 0; 1 0; O 1; 1 1] represents a square (4 vertices). Note that it is expected that each student creates a different polygon. (b) (1 mark) Using MATLAB's polyshape command and your matrix V, create a polyshape called p and plot it. (c) (1 mark) Apply a dilation matrix to your matrix V, Vd=V*[2 0; 0 2). Create a polyshape using the transformed matrix Vd and plot it. (d) (2 marks) Rotate your polygon counterclockwise by and plot the result. (e) (2 marks) Horizontally shear your polygon by a factor of 1 to the right and plot the result. (f) (3 marks) Plot the polygon which results from applying the horizontal shear in part (e) followed by the rotation in part (d). 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
