重重重重重重重重 重重 computer graphics

This preview shows page 43 - 50 out of 72 pages.

重重重重重重重重 | 重重 Computer Graphics 05/06/13 重重重 重重 43 Liang-Barsky Line Clipping Liang-Barsky Line Clipping Parameters u 1 and u 2 that define that part of the line lies within the clip rectangle The value of u 1 : From outside to inside (p k < 0) The value of u 2 : From inside to outside (p k > 0) If u 1 > u 2 , the line is completely outside the clip window. ) , 0 max( ' 1 s r u k = k k k p q r = ) , 1 min( ' 2 s r u k = k k k p q r =
Image of page 43

Subscribe to view the full document.

重重重重重重重重 | 重重 Computer Graphics 05/06/13 重重重 重重 44 Liang-Barsky Line Clipping Liang-Barsky Line Clipping
Image of page 44
重重重重重重重重 | 重重 Computer Graphics 05/06/13 重重重 重重 45 , 计计计计计计计计计计计计计计计计计计计 , 计计计计计计计计计计计计计计计计计计计 计计计计计计计计计计计 k 计计计计计 计计计 u 0 k p < 0 k p 0 k p k k u=q /p Xwm i n XWmax YWm i n YWmax P2 P1 A B C D 计计计 1) Δx≥0 计计 计计计计计 p1<0 p1=-Δx 计计 计计计计计计计计计计计计计 计计计计计 p2>0 p2=Δx 计计计计计计计计计 计计 计计计计 2) Δy>0 计计计计计计计 p3<0 p3=-Δy 计计 计计 计计计计计计计计计计计 计计计计计计计 p4>0 p4=Δy 计计计计计计计计计 计计 计计计计
Image of page 45

Subscribe to view the full document.

重重重重重重重重 | 重重 Computer Graphics 05/06/13 重重重 重重 46 0 k p < 计计计计计计计计计计计计计计 u1 u2 计计计计计计计计计计计计计计计计计 1 u1 计计计计计 计计计计 计计计计计计计计计计 计计计计计计计 u1 0 计计计 r 计计计计 计计计 2 u2 计计计计计 计计计计 计计计计计计计计计计 计计计计计计计 u2 0 计计计 r 计计计计 计计计 3 计计计 u1>u2 计计计计计计计计计计计计计计计计计计计计计 计计计计计计计计计计计计计计 u1 u2 计计计计计 0 k p XWm i n XWmax YWm i n YWmax X Y P1 P2 A B C D / k k k r q p = / k k k r q p =
Image of page 46
重重重重重重重重 | 重重 Computer Graphics 05/06/13 重重重 重重 47 1 计计计计计计计计计计计计 u1=0 u2=1 2 计计计计计计计计计计计 p q 计计 3 计计计计计 clipTest() 计计计计计计计 p q 计计计计计计计计计计 计计计计计计计计计 1 计 计 p<0 计计计计 r 计计计计 u1 计计 u1=max{u1 计…计 rk} 2 计 计 p>0 计计计计 r 计计计计 u2 计计 u2=min{u2 计…计 rk} 3 计计计计计计 u1 u2 计计计 u1>u2 计计计计计计计计 4 计计 p=0 q<0 计计计计计计计计计计计计计计计计计计计计 计计计计计计计计计计计计计 4 p q 计计计计计计计计计计计计计计计计计计计 计计计计计计计计计计计计计 u1 u2 计计计计计
Image of page 47

Subscribe to view the full document.

重重重重重重重重 | 重重 Computer Graphics 05/06/13 重重重 重重 48 3.2 3.2 计计计计计 计计计计计 计计 计计计计计计计计计计 计计计 计计计计计 计计计计计 计计计计计计计
Image of page 48
重重重重重重重重 | 重重 Computer Graphics 05/06/13
Image of page 49

Subscribe to view the full document.

Image of page 50

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern