2D and 3D Viewing Basics

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

Introduction to Computer Graphics 4. Viewing in 3D

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

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

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

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

Computer Viewing Computer Graphics I, Fall 2008

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

Geometry: Outline. Projections. Orthographic Perspective

Fundamental Types of Viewing

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

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

Computer Graphics. Basic 3D Programming. Contents

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Getting Started. Overview (1): Getting Started (1): Getting Started (2): Getting Started (3): COSC 4431/5331 Computer Graphics.

Advanced Computer Graphics (CS & SE )

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

CS354 Computer Graphics Viewing and Modeling

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

CS Rasterization. Junqiao Zhao 赵君峤

CS452/552; EE465/505. Models & Viewing

Computer Viewing. CITS3003 Graphics & Animation. E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley

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

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

CS 4204 Computer Graphics

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes

Describe the Orthographic and Perspective projections. How do we combine together transform matrices?

CS Surface Rendering

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing

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

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

Introduction to OpenGL

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

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

CS230 : Computer Graphics Lecture 6: Viewing Transformations. Tamar Shinar Computer Science & Engineering UC Riverside

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

Lecture 4. Viewing, Projection and Viewport Transformations

CS 418: Interactive Computer Graphics. Projection

CSC 470 Computer Graphics. Three Dimensional Viewing

CSC 470 Computer Graphics

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

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics

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

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

COMP3421. Introduction to 3D Graphics

MORE OPENGL. Pramook Khungurn CS 4621, Fall 2011

Viewing with Computers (OpenGL)

Three-Dimensional Viewing Hearn & Baker Chapter 7

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

CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Lecture 4: Viewing. Topics:

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

7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

CS380: Computer Graphics Viewing Transformation. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS D Transformation. Junqiao Zhao 赵君峤

To Do. Demo (Projection Tutorial) Motivation. What we ve seen so far. Outline. Foundations of Computer Graphics (Fall 2012) CS 184, Lecture 5: Viewing

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

Viewing Transformation

Computer Graphics. Ch 6. 3D Viewing

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

The View Frustum. Lecture 9 Sections 2.6, 5.1, 5.2. Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2011

OpenGL Transformations

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

Introduction to Computer Graphics with WebGL

CPSC 314, Midterm Exam 1. 9 Feb 2007

Pipeline Operations. CS 4620 Lecture 10

1 (Practice 1) Introduction to OpenGL

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

Projection Lecture Series

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

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

To Do. Motivation. Demo (Projection Tutorial) What we ve seen so far. Computer Graphics. Summary: The Whole Viewing Pipeline

COMP Computer Graphics and Image Processing. 5: Viewing 1: The camera. In part 1 of our study of Viewing, we ll look at ˆʹ U ˆ ʹ F ˆʹ S

3D Viewing. CS 4620 Lecture 8

Chapter 5. Projections and Rendering

Lecture 9 Sections 2.6, 5.1, 5.2. Wed, Sep 16, 2009

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

COMS 4160: Problems on Transformations and OpenGL

Chapter 8 Three-Dimensional Viewing Operations

On the Midterm Exam. Monday, 10/17 in class. Closed book and closed notes. One-side and one page cheat sheet is allowed. A calculator is allowed

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

Viewing and Projection

Chap 7, 2008 Spring Yeong Gil Shin

Pipeline Operations. CS 4620 Lecture 14

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Fachhochschule Regensburg, Germany, February 15, 2017

Lecture 5: Viewing. CSE Computer Graphics (Fall 2010)

Viewing and Projection Transformations

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)

Viewing. Reading: Angel Ch.5

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

Chapter 5-3D Camera & Optimizations, Rasterization

CSE328 Fundamentals of Computer Graphics

CS Computer Graphics. Junqiao Zhao 赵君峤

Wire-Frame 3D Graphics Accelerator IP Core. C Library Specification

Viewing/Projections IV. Week 4, Fri Feb 1

Transformations (Rotations with Quaternions) October 24, 2005

Transcription:

CS10101001 2D and 3D Viewing Basics Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University

Viewing Analog to the physical viewing Objects Camera the position of camera the type of lens the position and the shape of film Viewing is based on the relationship among these elements

Viewing Transformations (2013 Steve Marschner)

Coordinate frames Local coordinates World coordinates Camera coordinates (viewing coordinates) Screen/Viewport coordinates Window coordinates (device coordinates)

Viewing implementation Transform into camera coordinates. Perform projection into view volume or screen coordinates. Clip geometry outside the view volume. Remove hidden surfaces

2D viewing The Clipping Window The Viewport

right, top Clipping y Clipping window left, bottom? x A screen

Viewport Transform

Viewport Transform y Clipping window right, top y x left, bottom x y The Viewport The glut Window A screen x

What will happen? y Clipping window right, top y x left, bottom x y The Viewport The glut Window A screen x

right, top Implement Zooming? y Clipping window left, bottom The Viewport right, top x left, bottom

OpenGL Defining the Clipping Window glortho(left, right, bottom, top, -1, 1) gluortho2d(left, right, bottom, top) Defining the Viewport glviewport(x, y, width, height) In Camera Coordinates In Window Coordinates

The 3D viewing pipeline

Before the virtual camera.. The 2D clipping window => The 3D clipping volume

Orthographic view volume (Ken Power 2011)

Orthographic projection

Defining an orthographic view volume glortho(left, right, bottom, top, near, far) VC NDC

Multiview Orthographic Projection Projection plane parallel to principal face Usually form front, top, side views isometric front in CAD and architecture, we often display three multiviews plus isometric top side (2005 Angel)

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

Oblique Projection Arbitrary relationship between projectors and projection plane (2005 Angel)

Perspective projection

Perspective projection (Ken Power 2011)

Perspective view volume Also a 3D clipping volume called frustum (2013 Steve Marschner)

Defining perspective viewing frustum glfrustum(left, right, bottom, top, near, far) VC NDC

Defining perspective viewing frustum gluperspective(fov, aspect, near far)

Perspective projection

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 by hand uses these vanishing point(s) vanishing point (2005 Angel)

Advantages and Disadvantages Objects further from viewer are projected smaller than the same sized objects closer to the viewer (diminution) Looks realistic Equal distances along a line are not projected into equal distances (nonuniform foreshortening) Angles preserved only in planes parallel to the projection plane More difficult to construct by hand than parallel projections (but not more difficult by computer)

Finally the camera the position of camera The default camera is located at origin and points in the negative z direction the type of lens and the position of the film OpenGL also specifies a default view volume that is a cube with sides of length 2 centered at the origin Orthogonal

Moving the camera default frames frames after translation by d d > 0 (2005 Angel)

glulookat gllookat(eyex, eyey, eyez, atx, aty, atz, upx, upy, upz) (2005 Angel)

References Ed Angel, CS/EECE 433 Computer Graphics, University of New Mexico Steve Marschner, CS4620/5620 Computer Graphics, Cornell Tom Thorne, COMPUTER GRAPHICS, The University of Edinburgh Elif Tosun, Computer Graphics, The University of New York Lin Zhang, Computer Graphics, Tongji Unviersity

Questions?