Lecture06-Anti-Aliasing

# Solution 2 weighted area sampling treat pixel area as

• Notes
• 19

This preview shows page 8 - 14 out of 19 pages.

Solution 2: Weighted Area Sampling Treat pixel area as a circle with a radius of one pixel Use a radially symmetric weighting function (e.g., cone) : Areas closer to the pixel center are weighted more heavily Better results than unweighted, slightly higher cost Line One Pixel

Subscribe to view the full document.

Solution 3: Gupta-Sproull algorithm Calculate pixel intensity by computing distance from pixel center to line using the midpoint line algorithm x p NE m E x p+1 Line to draw v y p y p+1 Θ D
Gupta-Sproull algorithm (cont) D is the perpendicular distance from E to the line How do we compute it? a How does triangle abc compare to triangle ade? D c = e, and a = a, so b must equal d 2 2 cos dy dx vdx b v D + = = b c d e 2 2 cos cos dy dx dx b d + = = dx dy v r r

Subscribe to view the full document.

Gupta-Sproull algorithm (cont) Recall from the midpoint algorithm: So For pixel E: So: ( 29 0 2 ) , ( = + + = c by ax y x F = y = + 1 p x = v x p NE m E x p+1 Line to draw v y p y p +1 Θ D b c ax - + ) ( = + 1 p y p y = v 1 + - p y y 1 + p x p p y b c x a - - + + ) 1 (
Gupta-Sproull algorithm (cont) From previous slide: So From the midpoint computation, So: dx b - = p p y b c x a v - - + + = ) 1 ( 2 / ) , 1 ( ) 1 ( p p p p y x F c by x a vdx + = + + + = p p by c x a bv + + + = - ) 1 ( x p NE m E x p+1 Line to draw v y p y p+1 Θ D

Subscribe to view the full document.

Gupta-Sproull algorithm (cont) From the midpoint algorithm, we had the decision variable (remember?) Going back to our previous equation: ) 2
You've reached the end of this preview.
• Spring '08
• Jones,M
• Aliasing, Pixel, Anti-aliasing, Gupta-Sproull algorithm

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern