 Hello everyone, my name is Mr. Sandesh Paray, I am currently working as an assistant professor in the department of computer science and engineering at Walchand Institute of Technology, Solapur. In this video, I am going to cover the topic which is named as the Brayson Amps Circle Generation Algorithm. So let's start the discussion with the learning outcome. As we know that in the last video, we have covered the topic which is the algorithm of the line drawing, which is also developed by the Brayson Amps. But as the shape varies, it means I am talking about the line drawing and the circle drawing are very different because their working is very different way in the algorithm. So in this session, we are going to study about the Brayson Amps Circle Generation Algorithm. So at the end of this session, you can be able to apply the Brayson Amps Circle Generation Algorithm. So let's start the discussion about the Brayson Amps Circle Generation Algorithm. As we know that while the circle drawing, I am discussing about the generation of the circle on the computer screen. If we are thinking according to the graphical system, let's suppose the center of the circle is the intersection of the x and y coordinates. So according to that, we didn't know all the pixels which will connect the circle. It is not necessary, not needful. So you have to generate only the circle in the one octant. Why so? Because if you draw the circle in the first octant only. At that time, considering the x axis as a reflection spot, you will get the circle in the second quadrant. And if you consider the y axis as the reflection spot, then that same circle will be again reflected towards the third and fourth quadrant and it will be a complete circle. So in this fashion, you will cover the generation of the whole circle. So it is not necessary to get the location of all the pixels on the circle by the algorithm. You just need to draw the circle for only one quadrant and all other parts will be reflected by the reflections. And during the circle generation, you have to move towards the next pixel. You have to decide which should be your next pixel. At that time, on every pixel, you have only three options. Either you have to move vertically, either you have to move horizontally, otherwise you have to move diagonally. So there are three options. So on these situations, the increment and decrement of the x and y is dependent. And during that, one axis value will compulsory increment. It is based on the slope of the circle at that time. And the direction is decided on the starting point. It means if you suppose the first value in the quadrant taken as the 0th x axis and the certain y axis value, it means you have to move the clockwise direction. If you move by making the first point at the x axis, then you have to move the counterclockwise. It is dependent on that. See, as I said earlier, let us see only the first octane and in that there is also a diagonal where the value of the y is equal to x. Before that, you have to start the circle generation from the 0 to r, which is on the y axis. On the y axis, you have to start the circle generation. And the first point you will get is that the 0, r. That is, the circle should have equal radius at every point. And next, you have to move forward in the counterwise, which means you have to move the clockwise direction. And at that you have three options, as I said, either horizontally or diagonally or vertically. So on this basis, you have to move up to the diagonal value. And after that, the second part will be reflected. Again, you have to get reflection at second quadrant and that same circle will be reflected. This is the total phenomenon of the circle generation. As rasterization is nothing but the, when you have to move the horizontally. And means in the one line, scan line, you have to visit the multiple pixels. At that time, both of that pixels should be marked. As you can see, that the two graphs are there. The line is same, but based on that, the pixels marked are different. Means it is dependent on the rasterization. That which pixel should be marked for the line passing through each pixel. So, the problem statement is that only in two dimensional plane, you have to connect the proper points to get the actual circle. It means you can calculate the circle through pixel values. But you do not get the exact circle on the x axis. Means while traversing through it, you will get the next pixels. And through this process, you have to move forward and at last complete circle is generated. As I said earlier, there are on every pixel, you have three options are there. That is, there are three values as specified here. Horizontal, diagonal and vertical, these are denoted by mh, md and mv. Formulas are there. For the mh, you have to move one x axis towards the right one. That's why only x value will be incremented in that formula. As you can see, and in the diagonal, x and y value both are impacted. Because horizontally, you are moving forward and vertically, you are moving downward. And that's why the x and y value are impacting here in the diagonal. And with the vertical, only the y value will be decremented because you have to move the vertical. And according to these calculations, we have to compare between them. Means when the situation is like, we don't have to move vertically. At that time, the comparison between horizontal and diagonal is made. And according to that, particular location will be selected for the next pixel. One question for you guys, that how the complexity of calculating the exact pixel in the circle generation is released. Actually, as I said, that you don't need to be get every pixel on the circle boundaries. You just need to be draw a circle in the one quadrant and then by the using reflection policy, you will get the next pixels automatically. So, this is the formula of this, and due to using this formula, you will reduce your complexity and the time of the algorithm. This is the algorithm for the circle generation of the Bresenamps. As I said earlier, that delta value is there, which is calculated. And based on this, you have to compare. Means the sign of the delta bit will give you the output that you have to move in which direction. When the sign of the delta is negative, it means you can't move vertically. And there are only two options, if you can't vertically move. It means you have to move horizontally, otherwise you have to move diagonally one. So at that time, according to the MH and MD values, whichever minimum is there. On that basis, you have to go through that particular location and mark that pixel. And the in reverse also means whenever the value of the delta is holding the positive value, there are only two options. It means you can't move horizontally. You have to move vertically, otherwise diagonally. And again on that condition, you have to compare the MD and ME value, which is stored in the delta bar option. And according to that, the certain pixel will be selected. In this fashion, you have to iterate yourself throughout the algorithm and you will get the next pixel and finally, the circle will be drawn on the screen. So by putting these values, that 8 is the y value. And according to that, some calculations are made here. And on that basis, the values of the delta, delta bar and xy are shown here. So considering the radius as the 8, these values are output of my algorithm. Please get noted. So this is the output screen, which will be generated after execution of the brashen and circle algorithm. And these are some references I used to make this video. Thank you.