0% found this document useful (0 votes)
63 views

ComputerGraphics CS602 1 SOL - Do

The document provides instructions for Assignment No. 01 in CS602 - Computer Graphics, noting that it is due on October 31st, 2011 and will not receive credit if submitted late, corrupted, plagiarized, or missing student identification. It includes two questions, with the first asking about problems with odd parity polygon filling and advantages of even parity, and the second asking to provide all edge and global edge tables for a given figure using scan line polygon filling.

Uploaded by

Özlem Yurtsever
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

ComputerGraphics CS602 1 SOL - Do

The document provides instructions for Assignment No. 01 in CS602 - Computer Graphics, noting that it is due on October 31st, 2011 and will not receive credit if submitted late, corrupted, plagiarized, or missing student identification. It includes two questions, with the first asking about problems with odd parity polygon filling and advantages of even parity, and the second asking to provide all edge and global edge tables for a given figure using scan line polygon filling.

Uploaded by

Özlem Yurtsever
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment No.

01 Solution Fall 2011 CS602 Computer Graphics

Total Marks: 20 Due Date: October 31st, 2011

Instructions
Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: The assignment is submitted after due date. The submitted assignment does not open or file is corrupt. The assignment is copied or any sort of cheating found. Student ID is not mentioned properly in the assignment File.
Note: For any query about the assignment, contact at [email protected]

Question 1 10 marks What are the problems lying in odd parity method and how even parity can be used in advantage for filling polygon? Solution
The odd parity method creates a problem: How do we determine whether a pixel lies outside of the polygon to test for an inside one, if we cannot determine whether one lies within or outside of the polygon in the first place? If we assume our polygon lies entirely within our scene, then the edge of our drawing surface lies outside of the polygon. Furthermore, it would not be very efficient to check each point on our drawing surface to see if it lies within the polygon and, therefore, needs to be colored. So, we can take advantage of the fact that for each scan-line we begin with even parity; we have NOT crossed any polygon edges yet. Then as we go from left to right across our scan line, we will continue to have even parity (i.e., will not use the fill color) until we cross the first polygon edge. Now our parity has changed to odd and we will start using the fill color. How long will we continue to use the fill color? Well, our parity won't change until we cross the next edge. Therefore, we want to color all of the pixels from when we crossed the first edge until we cross the next one. Then the parity will become even again. So, you can see if we have a sorted list of x-intersections of all of the polygon edges

with the scan line, we can simply draw from the first x to the second, the third to the forth and so on.

Question 2 10 marks Using the scan line polygon filling algorithm, find "All edge table" and "Global edge table" for following figure.

Solution
1. All edge table

2. Global edge table

Deadline:

Your assignment must be uploaded/submitted on or before October 31st, 2011.

You might also like