Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Similar documents
Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Chap 7, 2009 Spring Yeong Gil Shin

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

Introduction to Computer Graphics 4. Viewing in 3D

Chap 7, 2008 Spring Yeong Gil Shin

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

Lecture 4: Viewing. Topics:

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University

Projections. Brian Curless CSE 457 Spring Reading. Shrinking the pinhole. The pinhole camera. Required:

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Chapter 8 Three-Dimensional Viewing Operations

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

Building Models. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard

CS452/552; EE465/505. Models & Viewing

Overview of Projections: From a 3D world to a 2D screen.

Chapter 5. Projections and Rendering

2D and 3D Viewing Basics

Realtime 3D Computer Graphics & Virtual Reality. Viewing

Three-Dimensional Viewing Hearn & Baker Chapter 7

Viewing. Cliff Lindsay, Ph.D. WPI

5.8.3 Oblique Projections

Transforms II. Overview. Homogeneous Coordinates 3-D Transforms Viewing Projections. Homogeneous Coordinates. x y z w

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Viewing with Computers (OpenGL)

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Fundamental Types of Viewing

CSE328 Fundamentals of Computer Graphics

CS488. Implementation of projections. Luc RENAMBOT

Viewing in 3D (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker)

Chapter 4-3D Camera & Optimizations, Rasterization

Building Models. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Must first specify the type of projection desired. When use parallel projections? For technical drawings, etc. Specify the viewing parameters

What does OpenGL do?

Announcement. Project 1 has been posted online and in dropbox. Due: 11:59:59 pm, Friday, October 14

Geometry: Outline. Projections. Orthographic Perspective

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

3-Dimensional Viewing

Computer Graphics 7: Viewing in 3-D

COMP30019 Graphics and Interaction Perspective Geometry

Chapter 5-3D Camera & Optimizations, Rasterization

COMP30019 Graphics and Interaction Perspective & Polygonal Geometry

Computer Graphics. Viewing. Fundamental Types of Viewing. Perspective views. Parallel views. October 12, finite COP (center of projection)

QUESTION BANK 10CS65 : COMPUTER GRAPHICS AND VISUALIZATION

Viewing/Projections IV. Week 4, Fri Feb 1

CS 4731/543: Computer Graphics Lecture 5 (Part I): Projection. Emmanuel Agu

Two Dimensional Viewing

Viewing. Reading: Angel Ch.5

Viewing. Part II (The Synthetic Camera) CS123 INTRODUCTION TO COMPUTER GRAPHICS. Andries van Dam 10/10/2017 1/31

Viewing and Projection Transformations

CS 325 Computer Graphics

Introduction to Computer Graphics with WebGL

CS 428: Fall Introduction to. Viewing and projective transformations. Andrew Nealen, Rutgers, /23/2009 1

Projection: Mapping 3-D to 2-D. Orthographic Projection. The Canonical Camera Configuration. Perspective Projection

(Refer Slide Time: 00:01:26)

Models and The Viewing Pipeline. Jian Huang CS456

Lecture 4. Viewing, Projection and Viewport Transformations

Reading. 18. Projections and Z-buffers. Required: Watt, Section , 6.3, 6.6 (esp. intro and subsections 1, 4, and 8 10), Further reading:

Projection Lecture Series

I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S

Computer Graphics Chapter 7 Three-Dimensional Viewing Viewing

CS 4204 Computer Graphics

SE Mock Online Retest 2-CG * Required

CS 351: Perspective Viewing

CS 543: Computer Graphics. Projection

CS 418: Interactive Computer Graphics. Projection

Examples. Clipping. The Rendering Pipeline. View Frustum. Normalization. How it is done. Types of operations. Removing what is not seen on the screen

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

CS 475 / CS 675 Computer Graphics. Lecture 7 : The Modeling-Viewing Pipeline

Viewing Transformations I Comp 535

Computer Viewing Computer Graphics I, Fall 2008

CS 563 Advanced Topics in Computer Graphics Camera Models. by Kevin Kardian

Viewing Transformation

Computer Graphics. Ch 6. 3D Viewing

CPSC 314, Midterm Exam 1. 9 Feb 2007

Aptitude Test Question

3D Viewing. CS 4620 Lecture 8

Announcements. Tutorial this week Life of the polygon A1 theory questions

Realtime 3D Computer Graphics Virtual Reality

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Contents. 1 Introduction Background Organization Features... 7

3D Viewing. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 9

Motivation. What we ve seen so far. Demo (Projection Tutorial) Outline. Projections. Foundations of Computer Graphics

Evening s Goals. Mathematical Transformations. Discuss the mathematical transformations that are utilized for computer graphics

Chap 3 Viewing Pipeline Reading: Angel s Interactive Computer Graphics, Sixth ed. Sections 4.1~4.7

1 Attempt any three of the following: 1 5 a. What is Computer Graphics? How image is to be display on Video Display Device?

Computer Viewing and Projection. Overview. Computer Viewing. David Carr Fundamentals of Computer Graphics Spring 2004 Based on Slides by E.

Computer Viewing. Prof. George Wolberg Dept. of Computer Science City College of New York

CHAPTER 1 Graphics Systems and Models 3

Advanced Computer Graphics (CS & SE )

3D Reconstruction from Scene Knowledge

DD2429 Computational Photography :00-19:00

Today. Rendering pipeline. Rendering pipeline. Object vs. Image order. Rendering engine Rendering engine (jtrt) Computergrafik. Rendering pipeline

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Transcription:

Computer Graphics Bing-Yu Chen National Taiwan Universit The Universit of Toko

Viewing in 3D 3D Viewing Process Classical Viewing and Projections 3D Snthetic Camera Model Parallel Projection Perspective Projection 3D Clipping for Canonical View Volume

3D Viewing Process Clip against view volume Project onto projection plane Transform into viewport in 2D device coordinates for displa 3D world-coordinate output primitives Clipped world coordinates 2D device coordinates 2

Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical views are based on the relationship among these elements The viewer picks up the object and orients it how she would like to see it Each object is assumed to constructed from flat principal faces Buildings, polhedra, manufactured objects 3

Classical Projections Front elevation Elevation oblique Plan oblique Isometric One-point perspective Three-point perspective 5

3D Snthetic Camera Model The snthetic camera model involves two components, specified independentl: objects (a.k.a geometr) viewer (a.k.a camera) 6

Imaging with the Snthetic Camera projector P image plane projection of P center of projection The image is rendered onto an image plane or project plane (usuall in front of the camera). Projectors emanate from the center of projection (COP) at the center of the lens (or pinhole). The image of an object point P is at the intersection of the projector through P and the image plane. 7

Specifing a Viewer Camera specification requires four kinds of parameters: Position: the COP. Orientation: rotations about aes with origin at the COP. Focal length: determines the sie of the image on the film plane, or the field of view. Film plane: its width and height, and possibl orientation. 8

Projections Projections transform points in n-space to m-space, where m < n. In 3D, we map points from 3-space to the projection plane (PP) along projectors emanating from the center of projection (COP). PP COP There are two basic tpe of projections: Perspective distance from COP to PP finite Parallel distance from COP to PP infinite 9

Perspective vs. Parallel Projections Computer graphics treats all projections the same and implements them with a single pipeline Classical viewing developed different techniques for drawing each tpe of projection Fundamental distinction is between parallel and perspective viewing even though mathematicall parallel viewing is the limit of perspective viewing

Perspective vs. Parallel Projections

Taonom of Planar Geometric Projections planar geometric projections parallel perspective multiview aonometric orthographic point 2 point 3 point oblique isometric dimetric trimetric 2

Orthographic Projection Projectors are orthogonal to projection surface 3

Multiview Orthographic Projection Projection plane parallel to principal face Usuall form front, top, side views isometric (not multiview orthographic view) front in CAD and architecture, we often displa three multiviews plus isometric top side 4

Advantages and Disadvantages Preserves both distances and angles Shapes preserved Can be used for measurements Building plans Manuals Cannot see what object reall looks like because man surfaces hidden from view Often we add the isometric 5

Aonometric Projections Allow projection plane to move relative to object classif b how man angles of a corner of a projected cube are the same none: trimetric two: dimetric three: isometric q q 3 q 2 6

Tpes of Aonometric Projections Dimetric Trimetric Isometric 7

Advantages and Disadvantages Lines are scaled (foreshortened) but can find scaling factors Lines preserved but angles are not Projection of a circle in a plane not parallel to the projection plane is an ellipse Can see three principal faces of a bo-like object Some optical illusions possible Parallel lines appear to diverge Does not look real because far objects are scaled the same as near objects Used in CAD applications 8

Oblique Projection Arbitrar relationship between projectors and projection plane 9

Advantages and Disadvantages Can pick the angles to emphasie a particular face Architecture: plan oblique, elevation oblique Angles in faces parallel to projection plane are preserved while we can still see around side In phsical world, cannot create with simple camera; possible with bellows camera or special lens (architectural) 2

Truncated View Volume for an Orthographic Parallel Projection Front Clipping plane View plane VRP Back Clipping plane VPN DOP F B 24

The Mathematics of Orthographic Parallel Projection Projection plane p View along ais View along ais p Projection plane P(,, ) P(,, ) p M ort ; p ; p 25

Perspective Projection Projectors converge at center of projection 27

Truncated View Volume for an Perspective Projection Front Clipping plane View plane VRP Back Clipping plane VPN F B 28

Perspective Projection (Pinhole Camera) P(,, ) P(,, ) d d p p View along ais View along ais Projection plane Projection plane / / ; / ; d M d d d d per p p p p 29

Perspective Division However W, so we must divide b W to return from homogeneous coordinates d d P M W Z Y X per p p p / d d d W Z W Y W X p p p, /, /,,,, 3

Vanishing Points Parallel lines (not parallel to the projection plan) on the object converge at a single point in the projection (the vanishing point) Drawing simple perspectives b hand uses these vanishing point(s) vanishing point 33

Three-Point Perspective No principal face parallel to projection plane Three vanishing points for cube 34

Two-Point Perspective On principal direction parallel to projection plane Two vanishing points for cube 35

One-Point Perspective One principal face parallel to projection plane One vanishing point for cube 36

Canonical View Volume for Orthographic Parallel Projection or - Back plane - Front plane - = -, = -, = =, =, = - 38

Clipping Lines F D D D E B A C H H J B A C H Clip rectangle G G I J I G t( ) t( )

The Cohen-Sutherland Line-Clipping Algorithm 2 3 X min X ma Y min Y ma Clip rectangle

The Cohen-Sutherland Line-Clipping Algorithm D C B A H I G F Clip rectangle E

Clipping Polgons Clip rectangle

The Sutherland-Hodgman Polgon-Clipping Algorithm Clip rectangle Right clip boundar Top clip boundar Bottom clip boundar Left clip boundar

The Sutherland-Hodgman Polgon-Clipping Algorithm Inside Outside Inside Outside Inside Outside Inside Outside p s s p: second output Polgon being clipped p s p:output s i: first Clip i:output output boundar Case Case 2 Case 3 Case 4 (no output)

The Etension of the Cohen-Sutherland Algorithm bit point is above view volume > bit 2 point is below view volume < - bit 3 point is right of view volume > bit 4 point is left of view volume < - bit 5 point is behind view volume < - bit 6 point is in front of view volume > 45

Intersection of a 3D Line a line from to can be represented as so when = t ),, ( P ),, ( P ) ( ) ( ) ( t t t ) )( ( ) )( ( 46

Canonical View Volume for Perspective Projection or - Back plane - Front plane - =, =, = - min = -, = -, = - 47

The Etension of the Cohen-Sutherland Algorithm bit point is above view volume > - bit 2 point is below view volume < bit 3 point is right of view volume > - bit 4 point is left of view volume < bit 5 point is behind view volume < - bit 6 point is in front of view volume > min 48

Intersection of a 3D Line so when = ) ( ) ( ) )( ( ) ( ) ( ) )( ( 49

Clipping in Homogeneous Coordinates Wh clip in homogeneous coordinates? it is possible to transform the perspective-projection canonical view volume into the parallel-projection canonical view volume M min min min, min 5

Clipping in Homogeneous Coordinates The corresponding plane equations are X = -W X = W Y = -W Y = W Z = -W Z = 5