Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 William H. Hsu Department of Computing.

Slides:



Advertisements
Similar presentations
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
Advertisements

CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
CS 551 / 645: Introductory Computer Graphics Clipping Lines and Polygons.
Computer Graphics, KKU. Lecture 81 Clipping on a Raster Display.
1 Clipping. 2 Transformation Sequence X Y Z X Y Z X Y Z X Y Z Object Coords. Eye Coords. Clip Coords. Normalized Device Coords. Screen Coords. Implementation:
Two-Dimensional Viewing Jehee Lee Seoul National University.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 2 1.
Computing & Information Sciences Kansas State University Lecture 20 of 42 CIS 530 / 730 Artificial Intelligence Lecture 20 of 42 Introduction to Classical.
Informationsteknologi Thursday, November 22, 2007Computer Graphics - Class 111 Today’s class Clipping Parametric and point-normal form of lines Intersecting.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Course Website: Computer Graphics 9: Clipping In 3D.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Visibility culling – Clipping. The visibility problem What polygons are visible? There are few visible polygons. –Avoid redundant processing Three classes.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Clipping.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Implementation I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 23 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University CIS 536/636 & 736 (Introduction to) Computer Graphics Lecture 1 of 41 William H. Hsu Department.
Computing & Information Sciences Kansas State University Advanced CG 1 of 8: TexturingCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.
2-Dimension Viewing and Clipping
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics William H. Hsu Department of Computing and Information.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Monday, 26 January 2004 William H. Hsu Department of.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, January 19, 2000 William H. Hsu Department.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 6 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 22 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 17 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 21 of 41 William H. Hsu Department of Computing.
CS 376 Introduction to Computer Graphics 02 / 12 / 2007 Instructor: Michael Eckmann.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, February 23, 2000 William H. Hsu Department.
CS 325 Introduction to Computer Graphics 03 / 08 / 2010 Instructor: Michael Eckmann.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Objectives Introduce basic implementation strategies Clipping Scan conversion.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
Clipping Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by David Luebke)
CS 480/680 Computer Graphics Shading in OpenGL Dr. Frederick C Harris, Jr. Fall 2013.
Computing & Information Sciences Kansas State University Lecture 20 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 21 of 42 William H. Hsu.
Computing & Information Sciences Kansas State University Lecture 15 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 15 of 42 William H. Hsu.
CSE Real Time Rendering Week 9. Post Geometry Shaders Courtesy: E. Angel and D. Shreiner – Interactive Computer Graphics 6E © Addison-Wesley 2012.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 3 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 5 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University Lecture 10 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 9 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University Lecture 13 of 42 CIS 530 / 730 Artificial Intelligence Lecture 13 of 42 William H. Hsu Department.
Computing & Information Sciences Kansas State University Lecture 40 of 42 CIS 530 / 730 Artificial Intelligence Lecture 40 of 42 A Brief Survey of Computer.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 8 of 41 William H. Hsu Department of Computing.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 2 of 41 William H. Hsu Department of Computing.
10/19/04© University of Wisconsin, CS559 Fall 2004 Last Time Clipping –Why we care –Sutherland-Hodgman –Cohen-Sutherland –Intuition for Liang-Barsky Homework.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Visible Surface Determination (VSD) To render or not to render, that is the question… 1 of.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, February 9, 2000 William H. Hsu Department.
Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Computing & Information Sciences Kansas State University Lecture 31 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 32 of 42 Wednesday, 11.
Computing & Information Sciences Kansas State University Monday, 23 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 25 of 42 Monday, 23 October.
Computing & Information Sciences Kansas State University Advanced CG 2 of 8: MappingsCIS 636/736: (Introduction to) Computer Graphics CIS 736 Computer.
Viewing and Projection
1Computer Graphics Implementation 1 Lecture 15 John Shearer Culture Lab – space 2
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, 12 April 2006 William H. Hsu Department.
Graphics Graphics & Graphical Programming Lecture 23 - Viewing & Clipping.
Lecture 13: Raster Graphics and Scan Conversion
Computing & Information Sciences Kansas State University Lecture 30 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 30 of 42 Wednesday, 09.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, March 1, 2000 William H. Hsu Department.
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Friday, January 21, 2000 William H. Hsu Department.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Monday, 17 April 2006 William H. Hsu Department of.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
Midterm Review Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CS552: Computer Graphics Lecture 12: 3D Clipping.
3D Clipping.
Lecture 13 Clipping & Scan Conversion
Presentation transcript:

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: / Public mirror web site: Instructor home page: Readings: Today: Sections 2.3.5, 2.4, 3.1.3, Eberly 2 e – see Next class: Sections 2.4, 2.5, 3.1.6, Eberly 2 e Brown CS123 slides on Clipping – Wayback Machine archive of Brown CS123 slides: Viewing 4 of 4: Culling and Clipping Lab 1b: Flash Intro Lecture 7 of 41

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Lecture Outline Reading for Last Class: Sections 2.5.1, 3.1 Eberly 2 e Reading for Today: §2.3.5, 2.4, 3.1.3, Eberly 2 e Reading for Next Class: §2.4, 2.5 (Especially 2.5.4), 3.1.6, Eberly 2 e Last Time: Scan Conversion (aka Rasterization) of Lines  Incremental algorithm  Bresenham’s algorithm & midpoint line algorithm  Preview: Circles and Ellipses (Lecture 8) Today: Intro to Clipping and Culling  Clipping  2-D derivation: clip edges  Algorithms: Cohen-Sutherland, Liang-Barsky/Cyrus-Beck  3-D derivation: clip faces  Culling  Back face culling  Occlusion culling

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Where We Are

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Clipping Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Line Clipping Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Parametric Line Formulation For Clipping Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Cohen-Sutherland 2-D Clipping: Outcodes [1] Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Cohen-Sutherland 2-D Clipping: Outcodes [2] Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Cohen-Sutherland Algorithm [1] Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Cohen-Sutherland Algorithm [2] Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Scan Conversion after Clipping Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Sutherland-Hodgman Polygon Clipping Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Cyrus-Beck / Liang-Barsky Parametric Line Clipping [1] Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission. Cyrus-Beck / Liang-Barsky Parametric Line Clipping [2]

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission. Cyrus-Beck / Liang-Barsky Parametric Line Clipping [3]

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission. Cyrus-Beck / Liang-Barsky Line Clipping Algorithm

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Parametric Line Clipping For Upright Clip Rectangle [1] Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission. Parametric Line Clipping For Upright Clip Rectangle [2]

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Culling: A Form of Visible Surface Determination Adapted from slides © 1997 – 2010 van Dam et al., Brown University Reused with permission.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Visibility Culling: View Frustum, Back Face, Occlusion © 1998 – 2004 Kim et al., KAIST VR Lab

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Occlusion Culling © 2010 Kwoon, J. (Jakkor), Roblox.com © 2004 Sekulic, D. Chapter 29: Efficient Occlusion Culling. In Fernando, R., ed., GPU Gems. Reading, MA: Addison-Wesley.

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Lab 1B Adobe Flash  Basic 2-D (up to Flash v9)  3-D: Flash 10+  Simple Flash animation exercise Animation Ideas  Animate: to “bring to life”  From still frames to animations  Incremental change and smoothness Using Culling  Back faces illustrated  What to do besides cull Simple Flash Animation Exercise  Watch Senocular.com tutorial(s) as needed (  Turn in  ActionScript source code  Screenshot(s) as instructed in Lab 1 handout

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Summary Last Time: Scan Conversion (aka Rasterization)  Lines: incremental algorithm vs. (Bresenham’s) midpoint algorithm  Decision variables and forward differences  Circles and Ellipses (preview) See Also: CG Basics  CG Basics 3: Projections and 3-D Viewing (in detail)  CG Basics 4: Fixed-Function Graphics Pipeline Today: Clipping and Culling  What parts of scene to clip: edges vs. polygons of model  What parts of viewport to clip against: clip faces vs. clip edges  Clipping techniques  Cohen-Sutherland: outcodes (quick rejection), test intersections  Liang-Barsky / Cyrus-Beck: solve for t, find innermost PE/PL  Visibility culling: view frustum, back face, occlusion Next: More Scan Conversion (Polygons, Scan Line Interpolation)

Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 7 of 41 Terminology Fixed Function Pipeline  Modelview transformation  Normalizing transformation (inverse of viewing transformation) Coordinate Spaces  Model space – absolute w.r.t. model  World space aka scene space – absolute w.r.t. scene, canonical  Camera / Eye / View space – relative, user-defined, arbitrary  Clip space – before perspective division  Normalized device coordinates – after perspective division Clipping and Culling  Clip faces/edges – clip region (screen, view volume) boundaries  Clipping techniques  Cohen-Sutherland: outcodes (quick rejection), test intersections  Liang-Barsky / Cyrus-Beck: solve for t, innermost PE/PL  Visibility culling: view frustum, back face, occlusion