1 / 28

CS32310

CS32310. ADVANCED COMPUTER GRAPHICS Down the rendering pipeline . Down the rendering pipeline. Notes adapted from D.J. Duke (pp177-192) University of York (Leeds, Bath). 177. 178. 179. Clipping versus scissoring. 180. Clipping Polygons. (Inside? Outside?). 181.

majed
Download Presentation

CS32310

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS32310 ADVANCED COMPUTER GRAPHICS Down the rendering pipeline 

  2. Down the rendering pipeline Notes adapted from D.J. Duke (pp177-192) University of York (Leeds, Bath).

  3. 177

  4. 178

  5. 179 Clipping versus scissoring

  6. 180 Clipping Polygons (Inside? Outside?)

  7. 181 Implementing Sutherland-Hodgman

  8. 181a O J Clipping Polygons K I G A N H Clip against Left boundary F E D A B  C D E F G H I J K M . L, C D M N, F G H I J O . B C L Wrap round! O joins L Wrap round from K to A produces no output

  9. 181b J O Clipping Polygons I G H Clip against Left boundary (result) F N D M L C D M N F G H I J O L C M to N crossed forwards and backwards!

  10. 181c J O Clipping Polygons I G H Clip against Right boundary F N D M L C  D M N F G H I J O L C D M N F G H I J O L C No change

  11. 181d J O Clipping Polygons I G H Clip against Bottom boundary F N Q D M L C  D M N F G H I J O . P, D M N F G H I J O Q L C P Wrap round from O to L produces Q

  12. 181e J O Clipping Polygons I G H Clip against Bottom boundary (result) F N D M P D M N F G H I J O Q P Q

  13. 181f J O Clipping Polygons S R I G H Clip against Top boundary F N D M P D  M N F G H I J O Q . D M N F G H R . . S P P Q

  14. 181g Clipping Polygons R S G H Clip against Top boundary (result) F N D M D M N F G H R S Q P P Q

  15. 182 Implementing Sutherland-Hodgman

  16. 182 Filling a polygon horizontal edge: ignore (LM) start and interior of edge: keep end and any right edge pixel: ignore

  17. 183 Edge tables (omit lines of zero gradient in Edge Table) 8 8 7

  18. 183a Filled-polygon algorithm Walk-through example 177

  19. 183b 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B E A F D y=1 DE DC 4 9 8 9 Active edge table

  20. 183c 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B 2/3 E A F D y=2 AB DE FE DC 5 0 4 4 4 7 8 8 Active edge table

  21. 183d 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B E A F D y=3 AB DE FE DC 5 4 4 4 6 8 8 Active edge table

  22. 183e 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B E A F D y=4 AB DC 5 1 8 8 Active edge table

  23. 183f 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B E A F D y=5 BC DC 8 2 8 7 Active edge table

  24. 183g 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B E A F D y=6 BC DC 8 3 8 7 Active edge table

  25. 183h 9 8 7 6 5 4 5 2/3 3 2 1 0 0 1 2 3 4 5 6 7 8 9 C 8 B E A F D y=7 BC DC 8 5 8 7 Active edge table

  26. 184 Filled-polygon algorithm while e.counter >= e.dy { e.xinit++; e.counter ─= e.dy} UNTIL AET and ET are empty UNTIL AET and ET are empty 8 8

  27. 184a Filled-polygon algorithm – while loop explanation 2 updates to 2(5,3)  3(2,3) updates to 3(7,3)  4(4,3)  5(1,3) updates to 5(6,3)  6(3,3)  7(0,3) while e.counter >= e.dy { e.xinit++; e.counter ─= e.dy} UNTIL AET and ET are empty 8

  28. END

More Related