 Hello everyone. Welcome to the lecture series on computer graphic 2D sharing. At the end of this session, students will be able to define 2D sharing, represent 2D sharing matrix, solve problem based on 2D sharing in computer graphic. In the previous lecture, we have seen several transformations. In this video lecture, I will be discussing about two-dimensional sharing in computer graphic, how to represent a sharing matrix and finally conclude by solving some practice problem based on 2D sharing. Transformation is a process of modifying and repositioning objects in the existing graphic. When the transformation takes place on a two-dimensional plane, it is called as 2D transformation whereas when it takes place in a three-dimension plane, it is called as 3D transformation. Transformation in computer graphics are broadly categorized as translation, rotation, scaling, reflection and shear. In this video lecture, we will be discussing about 2D sharing. In 2D sharing, sharing is an ideal technique to change the shape of an existing object in a two-dimensional plane. In a two-dimensional plane, the object size can be changed along x direction as well as y direction. So, there are two versions of sharing. That is, sharing in x direction and sharing in y direction. We will see each of them in detail. So, consider a point object O has to be sheared in a 2D plane. Let the initial coordinate of object O be x-old and y-old. Shearing parameter towards x direction is represented as shx whereas sharing parameter towards y direction is equal to shy. So, the two coordinates of the object O after sharing are x-new and y-new. As you can see, in the diagram, this is the original object. When we apply sharing in x direction by using the following sharing equation. Here, the change in the original object is observed only in the x direction. You can see over here, x-new is equal to x-old plus sharing x into y-old. y-new is equal to y-old. There is no change in the y coordinate. As you can see, the original object is a square. When sharing transformation is applied in x direction, you see a slant in the object. The matrix form of the above sharing equation can be represented as x-new y-new is equal to 1. As the sharing is in x direction, we have shx01 into x-old y-old. This is the sharing matrix in x direction. Now, we see the sharing in y direction. Sharing in y axis is achieved by using the following sharing equation. x-new is equal to x-old. Here, the x dimensions do not get changed. Whereas, you can see here with respect to the original object, the object after y shear is changed. There is a change in the new y, the old y and the new y. So, the new y that is y-new is equal to y-old plus shy into x-old. So, in the matrix form, we have the above sharing equation that can be represented as x-new y-new is equal to 10 shy1 into x-old y-old. This is the sharing matrix in y direction. Now, we can represent this matrix in homogeneous coordinate. For your understanding, I have represented the sharing matrix in y axis in a homogeneous representation using 3x3 matrix. This is represented as x-new y-new 1 is equal to 1 shy0 0 1 0 0 0 1 into x-old y-old and 1. The same can be applied for x-axis. Only the change here will be x-x, here it will be shy. Okay? Now that you have understood the concept of sharing and the representation of sharing in x-axis and y-axis as shown in this matrix form, we will now solve a practice problem based on 2D sharing. Now, given a triangle with points 1 1 0 0 1 0, apply shear parameter 2 on x-axis and 2 on y-axis and find out the new coordinate of the object. So, I hope that you have got the problem. We are given a triangle 3 points and we have to apply the shear parameter using x-axis with 2 units and y-axis using 2 units. So, let's solve this using a stepwise approach. So, the old corner coordinates of the triangle are a 1 1 b 0 0 c 0 1. So, shearing parameter towards x-direction that is shx is equal to 2, shearing parameter towards y-direction shy is equal to 2. Now, for coordinates 1 comma 1, we have the new coordinates after shearing x-new y-new is equal to x-new is equal to x-old plus shx into y-old that is 1 plus 2 into 1 because 2 is the shearing in x-direction, we get answer 3 and y-old remains the same. Thus, the new coordinates of corner a after shearing are 3 comma 1. Now, for the next coordinate of the triangle b 0 0. So, after applying the shearing equation we have x-new is equal to 0 and y-new is equal to 0. Thus, the new coordinates of corner b after shearing are 0 0. Moving ahead towards the coordinate c of the triangle where you have x-new y-new using the equation that is x-old plus shx into y-old that is 1 plus 2 into 0 is equal to 1 and y-new is equal to y-old. Thus, we can see that the new coordinates after applying the shearing in x-direction for the given triangle are a is equal to 3 comma 1 b 0 0 c 1 comma 0. Now, we are done with the shearing using x-axis. Now, we see for shearing the same problem in y-axis. Here also the shearing unit that has been given is 2 units. So, applying the new coordinates for corner a after shearing we have x-new is equal to y-old x-old that is 1 and y-new is equal to y-old plus shy into x-old that is 1 into 2 comma 1. 1 plus 2 into 1 is equal to 3. Thus, the new shearing coordinates for corner a after shearing are 1 comma 3. Moving ahead for corner b we apply the shearing in y-axis. So, we have the coordinates x-new is equal to 0 by applying the formula and y-new is equal to y-old plus shy into x-old that is 0 into 2 0 plus 2 into 0 is equal to 0. That is the new coordinates for corner b after shearing are 0 comma 0 and for the last coordinate c comma 0 we have the new coordinates after applying shearing in y-axis we have 1 comma 2. Now, you can see the new coordinates of the triangle after applying shearing in y-axis 1 comma 3 0 0 and 1 comma 3. So, for this given triangle a, b, c you can see the new coordinates shearing in x-axis and you can see shearing in y-axis. You can see 1 3 over here you can see b 0 0 and c 1 comma 2. Okay. So, these are the shearing applied in x-axis and shearing applied in y-axis. I hope that you have understood the concept of two-dimensional shearing in x-axis and y-axis how to represent a shearing matrix in the normal form and also in the homogeneous form and you have got an idea of solving and applying the matrix equation to a given graphics primitive. Now, I request the students to pause the video for some time and answer and solve the given problem. Here a given triangle with points 1 comma 1 0 0 and 1 0 find out the new coordinates of the object along x and y-axis applying shear parameter 4 on x-axis and 1 on y-axis. So, I request dear students you pause the video over here for some time and solve the given problem using the matrix equations that we have learned. On applying the matrix equation, okay, we get the new coordinates for the triangle that is a dash b dash c dash as 5 comma 0 0 comma 0 1 comma 0 along the x-axis. Whereas along the y-axis where the shearing factor was 1, we get the coordinates a dash is equal to 1 comma 2, b dash is equal to 0 comma 0, c dash is equal to 1 comma 1. I hope you have got an understanding of two-dimensional shearing. These are the references. Thank you for your patient listening.