tailieunhanh - Giáo trình đồ họa - Lesson 3

Các giải thuật cơ sở Nội dung Các giải thuật xén tỉa - Clipping Các thuật toán tô miền kín Phép tô mầu Phép xử lý Antialiasing | Khoa CNTT-DDHBK Hà nội Email hunglt@ 0913030731 Bài 3 Các giải thuật cơ sở Nội dung Các giải thuật xén tỉa - Clipping Các thuật toán tô miền kín Phép tô mầu Phép xử lý Antialiasing Le Tan Hung hunglt@ c SE FIT HUT 2002 2 c SE FIT HUT 2002 Xén tỉa - Clipping Clipping đoạn thẳng ri A fundamental task in graphics is to keep those parts of an object that lie outside a selected view from beingl I drawn Clipping is the removal of all objects I or part of objects in a modelled scene that are outside the real-world window. Việc loại từng điếm ảnh của đối tượng thường chậm nhất là khi đối tượng mà phần lon nằm ngoài cửa sổ hiến thị. More practical techniques are necess ary to speed up the task Khái niệm Xén tỉa là tiến trình xác định các điếm của 1 đối tượng nằm trong hay ngoài cửa sổ hiến thị Clipping điếm xmin x xmax ymin y ymax Lines are defined by their endpoints so it should be possible just to examine these in a similar way to points and determine whether or not to clip without considering every pixel on the line We often have windows that are either very large . nearly the whole scene fits inside or very small . most of the scene lies inside the window Hence most lines may be either trivially accepted or rejected 3 c SE FIT HUT 2002 c SE FIT HUT 2002 4 Giải thuật Cohen Sutherland Outcode The Cohen-Sutherland line-clipping algorithm is particularly fast for trivial cases . lines completely inside or outside the window. Non-trivial lines . ones that cross a boundary of the window are clipped by computing the coordinates of the new boundary endpoint of the line where it crosses the edge of the window Each point on all lines are first assigned an outcode defining their position relative to the clipping rectangle Nếu mã của P1 và P2 đều 0000 thì toàn bộ đoạn thẳng thuộc phần hiển thị. If OR 0000 then cảđoạnthẳngthuộccửasổ hiểnthị I IINeu mã của P1 và P2 có cùng một vị trí mà ở đó 0 thì P1 và P2 cùng phía If .

TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.