Lecture Computer graphics: Lecture 21 - Fasih ur Rehman

13 63 0
Lecture Computer graphics: Lecture 21 - Fasih ur Rehman

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

This chapter explain why computer literacy is vital to success in today''s world, describe the five components of a computer, discuss the advantages and disadvantages that users experience when working with computers, discuss the uses of the Internet and World Wide Web,...

Computer Graphics Lecture 21 Fasih ur Rehman Last Class • Clipping Algorithms Today’s Agenda • Clipping Algorithms Cohen – Sutherland Line Clipping • Cohen – Sutherland Line Clipping The view window is divided into regions as shown in the figure • Each region is assigned a 4-bit outcode • Cohen – Sutherland Line Most significant bit (MSB) called bit indicates y-value of Clipping points are above ymax • Bit indicates y-value of points are below ymin • Bit indicates x-value of points are to the right of Xmax • Bit indicates x-value of points are to the left of Xmin • Cohen – Sutherland Line Clipping For each line segment – Assign an outcode to each vertex – If both outcodes = 0, (by bit – wise OR operation) • – trivial accept (Line AB of the Figure) Else • AND (bitwise) vertex outcodes • if result 0, trivial reject (e g EF) • Cohen – Sutherland Line If line cannot beClipping trivially accepted or rejected, subdivide the line into the segments either or both of which can be rejected – Start with an edge of view window that the line intersects – Find intersection of line with the edge – Reject the segment on wrong side of edge (outside the view window) and assign new outcode to new vertex – Apply trivial accept/reject tests • Cohen – Sutherland Line If line can neither Clipping be trivially accepted nor rejected, subdivide the line so that o both or either of the two segments can be discarded • Select an edge that the line crosses – Keep check order the same order each time To find intersection point Parametric Form of Line Summary • Clipping References • • Fundamentals of Computer Graphics Third Edition by Peter Shirley and Steve Marschner Interactive Computer Graphics, A Topdown Approach with OpenGL (Sixth Edition) by Edward Angel ... the figure • Each region is assigned a 4-bit outcode • Cohen – Sutherland Line Most significant bit (MSB) called bit indicates y-value of Clipping points are above ymax • Bit indicates y-value... • Bit indicates y-value of points are below ymin • Bit indicates x-value of points are to the right of Xmax • Bit indicates x-value of points are to the left of Xmin • Cohen – Sutherland Line... Line Summary • Clipping References • • Fundamentals of Computer Graphics Third Edition by Peter Shirley and Steve Marschner Interactive Computer Graphics, A Topdown Approach with OpenGL (Sixth

Ngày đăng: 30/01/2020, 06:13

Từ khóa liên quan

Mục lục

  • Slide 1

  • Last Class

  • Today’s Agenda

  • Cohen – Sutherland Line Clipping

  • Cohen – Sutherland Line Clipping

  • Cohen – Sutherland Line Clipping

  • Cohen – Sutherland Line Clipping

  • Cohen – Sutherland Line Clipping

  • Cohen – Sutherland Line Clipping

  • To find intersection point

  • Parametric Form of Line

  • Summary

  • References

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan