Computer Graphics I

Assignment 10

Group III (Yavor Kaloyanov)

Jan Hendrik Dithmar

2031259

Pascal Gwosdek

2505221

Assignment 10  Dithmar (2031259), Gwosdek (2505221)

10.1 Clipping

C_{1} C_{2}  C_{3} C_{4} P_{1} P_{2}  P_{3} P_{4}

Given:

C_{1} = (0, 0), C_{2} = (0, 6), C_{3} = (12, 6), C_{4} = (12, 0)

and

P_{1} = (9, 8), P_{2} = (−6, 3), P_{3} = (14, 20), P_{4} = (15, −4)

Clipping against top edge: we start with P_{1} and P_{2}

• P_{1} and P_{2}: P_{1} outside, P_{2} inside P_{5} = intersection at \overline{P_{1}P_{2}} with straight through C_{2}, C_{3} polygon points {P_{5}, P_{2}}.

• P_{2} and P_{3}: P_{2} inside, P_{3} outside P_{6} = intersection at \overline{P_{2}P_{3}} with straight through C_{2}, C_{3} polygon points {P_{5}, P_{2}, P_{6}}.

• P_{3} and P_{4}: P_{3} outside, P_{4} inside P_{7} = intersection at \overline{P_{3}P_{4}} with straight through C_{2}, C_{3} polygon points {P_{5}, P_{2}, P_{6}, P_{7}, P_{4}}.

• P_{4} and P_{1}: P_{4} inside, P_{1} outside P_{8} = intersection at \overline{P_{4}P_{1}} with straight through C_{2}, C_{3} polygon points {P_{5}, P_{2}, P_{6}, P_{7}, P_{4}, P_{8}}.

Assignment 10  Dithmar (2031259), Gwosdek (2505221)

C_{1} C_{2}  C_{3} C_{4} P_{1} P_{2}  P_{3} P_{4} P_{5} P_{6}  P_{8}  P_{7}