У нас вы можете посмотреть бесплатно (Part-7.6) Cohen Sutherland Line Clipping (Numerical) | কম্পিউটার গ্রাফিক্স বাংলা টিউটোরিয়াল или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
#computergraphics #computergraphicslecture #computergraphicslecturesinbangla #cohensutherlandlineclippingalgorithm #cohensutherlandlineclipping Cohen–Sutherland Algorithm In this algorithm, we are given 9 regions on the screen. Out of which one region is of the window and the rest 8 regions are around it given by 4 digit binary. The division of the regions are based on (x_max, y_max) and (x_min, y_min). The central part is the viewing region or window, all the lines which lie within this region are completely visible. A region code is always assigned to the endpoints of the given line. To check whether the line is visible or not. Formula to check binary digits:- TBRL which can be defined as top, bottom, right, and left accordingly. There are three possible cases for any given line. Completely inside the given rectangle : Bitwise OR of region of two end points of line is 0 (Both points are inside the rectangle) Completely outside the given rectangle : Both endpoints share at least one outside region which implies that the line does not cross the visible region. (bitwise AND of endpoints != 0). Partially inside the window : Both endpoints are in different regions. In this case, the algorithm finds one of the two points that is outside the rectangular region. The intersection of the line from outside point and rectangular window becomes new corner point and the algorithm repeats TBRL Rule Algorithm Steps 1) Assign the region codes to both endpoints. 2) Perform OR operation on both of these endpoints. 3) if OR = 0000, then it is completely visible (inside the window). else Perform AND operation on both these endpoints. i) if AND ≠ 0000, then the line is invisible and not inside the window. Also, it can’t be considered for clipping. ii) else AND = 0000, the line is partially inside the window and considered for clipping. 4) After confirming that the line is partially inside the window, then we find the intersection with the boundary of the window. By using the following formula:- Slope:- m= (y2-y1)/(x2-x1) a) If the line passes through top or the line intersects with the top boundary of the window. x2 = x1 + (y_wmax – y1)/m y2 = y_wmax b) If the line passes through the bottom or the line intersects with the bottom boundary of the window. x2 = x1 + (y_wmin – y1)/m y2 = y_wmin c) If the line passes through the left region or the line intersects with the left boundary of the window. y2 = y1+ (x_wmin – x1)*m x2 = x_wmin d) If the line passes through the right region or the line intersects with the right boundary of the window. y2 = y1 + (x_wmax -x1)*m x2 = x_wmax 5) Now, overwrite the endpoints with a new one and update it. 6) Repeat the 4th step till your line doesn’t get completely clipped Given a set of lines and a rectangular area of interest, the task is to remove lines that are outside the area of interest and clip the lines which are partially inside the area.