1. Trang chủ
  2. » Công Nghệ Thông Tin

Lecture Computer graphics: Lecture 21 - Fasih ur Rehman

13 64 0

Đ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

Thông tin cơ bản

Định dạng
Số trang 13
Dung lượng 30 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

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,...

Trang 1

Computer Graphics

Lecture 21 Fasih ur Rehman

Trang 2

Last Class

• Clipping Algorithms

Trang 3

Today’s Agenda

• Clipping Algorithms

Trang 4

Cohen – Sutherland Line

Clipping

Trang 5

Cohen – Sutherland Line

Clipping

• The view window is divided into regions as shown in the figure

• Each region is assigned a 4-bit outcode

Trang 6

Cohen – Sutherland Line

Clipping

• Most significant bit (MSB) called bit 1 indicates y-value of points are above ymax

• Bit 2 indicates y-value of points are below ymin

• Bit 3 indicates x-value of points are to the right of Xmax

• Bit 4 indicates x-value of points are to the left of Xmin

Trang 7

Cohen – Sutherland Line

Clipping

• For each line segment

operation)

• trivial accept (Line AB of the Figure)

– Else

• AND (bitwise) vertex outcodes

• if result 0, trivial reject (e g EF)

Trang 8

Cohen – Sutherland Line

Clipping

• If line cannot be trivially accepted or

rejected, subdivide the line into the

segments either or both of which can be

rejected

intersects

(outside the view window) and assign new

outcode to new vertex

Trang 9

Cohen – Sutherland Line

Clipping

rejected, subdivide the line so that o both or either

of the two segments can be discarded

Trang 10

To find intersection point

Trang 11

Parametric Form of Line

Trang 12

• Clipping

Trang 13

• Fundamentals of Computer Graphics Third Edition by Peter Shirley and Steve

Marschner

• Interactive Computer Graphics, A

Top-down Approach with OpenGL (Sixth

Edition) by Edward Angel

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

TỪ KHÓA LIÊN QUAN