Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Similar documents
Three-Dimensional Viewing Hearn & Baker Chapter 7

Viewing with Computers (OpenGL)

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

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE328 Fundamentals of Computer Graphics

CSE452 Computer Graphics

Lecture 4. Viewing, Projection and Viewport Transformations

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

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

Overview. By end of the week:

THE VIEWING TRANSFORMATION

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

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

Models and The Viewing Pipeline. Jian Huang CS456

CS 4204 Computer Graphics

1 OpenGL - column vectors (column-major ordering)

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

15. Clipping. Projection Transformation. Projection Matrix. Perspective Division

Computer Graphics. Chapter 10 Three-Dimensional Viewing

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

Geometry: Outline. Projections. Orthographic Perspective

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

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

Chapter 5. Projections and Rendering

Computer Graphics 7: Viewing in 3-D

3D Viewing. CS 4620 Lecture 8

Rasterization Overview

Perspective transformations

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

CMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker

THE CAMERA TRANSFORM

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

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

Beaumont Middle School Design Project April May 2014 Carl Lee and Craig Schroeder

Computer Graphics with OpenGL ES (J. Han) Chapter VII Rasterizer

Ray Tracer I: Ray Casting Due date: 12:00pm December 3, 2001

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

OpenGL Transformations

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

COMPUTER AIDED ARCHITECTURAL GRAPHICS FFD 201/Fall 2013 HAND OUT 1 : INTRODUCTION TO 3D

Chapter 8 Three-Dimensional Viewing Operations

INTRODUCTION TO COMPUTER GRAPHICS. cs123. It looks like a matrix Sort of. Viewing III. Projection in Practice 1 / 52

3.6: First Person Computer Games

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

Mathematics Assessment Anchor Glossary Grades 3 & 4

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics

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

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

Computer Graphics: Two Dimensional Viewing

COMP3421. Introduction to 3D Graphics

Graphics pipeline and transformations. Composition of transformations

Culling. Computer Graphics CSE 167 Lecture 12

Mathematics 308 Geometry. Chapter 9. Drawing three dimensional objects

UNIT - V PERSPECTIVE PROJECTION OF SIMPLE SOLIDS

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations

Game Architecture. 2/19/16: Rasterization

Viewing. Reading: Angel Ch.5

TRANSFORMATIONS. The original figure is called the pre-image; the new (copied) picture is called the image of the transformation.

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

CS602 Midterm Subjective Solved with Reference By WELL WISHER (Aqua Leo)

Perspective Mappings. Contents

ARCHITECTURE & GAMES. A is for Architect Simple Mass Modeling FORM & SPACE. Industry Careers Framework. Applied. Getting Started.

Geometry Vocabulary. acute angle-an angle measuring less than 90 degrees

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

Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th

Projection and viewing. Computer Graphics CSE 167 Lecture 4

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

On-Line Computer Graphics Notes CLIPPING

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

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

The Graphics Pipeline and OpenGL I: Transformations!

CS 381 Computer Graphics, Fall 2012 Midterm Exam Solutions. The Midterm Exam was given in class on Tuesday, October 16, 2012.

Shadows in 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

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

Transformation Pipeline

Perspective matrix, OpenGL style

Study Guide and Review

SHAPE AND STRUCTURE. Shape and Structure. An explanation of Mathematical terminology

Computer Science 474 Spring 2010 Viewing Transformation

The Three Dimensional Coordinate System

Answer Key: Three-Dimensional Cross Sections

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

CSE 167: Introduction to Computer Graphics Lecture #3: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Let a line l and a point P not lying on it be given. By using properties of a transversal and parallel lines, a line which passes through the point P

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

Practical Shadow Mapping

Interactive OpenGL Animation

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

CS 4620 Midterm 1. Tuesday 22 October minutes

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018


LESSON 14 LEARNING OBJECTIVES. After completing this lesson, you will be able to:

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

Raycasting. Chapter Raycasting foundations. When you look at an object, like the ball in the picture to the left, what do

Perspective Shadow Maps. Shadow Map Aliasing. in particular for large scenes shadow maps impossible for infinite scenes

The Graphics Pipeline and OpenGL I: Transformations!

CSE 167: Introduction to Computer Graphics Lecture #5: Projection. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017

3D Viewing Episode 2

Transcription:

Model s Lecture 3 Sections 2.2, 4.4 World s Eye s Clip s s s Window s Hampden-Sydney College Mon, Aug 31, 2009

Outline Model s World s Eye s Clip s s s Window s 1 2 3 Model s World s Eye s Clip s s s Window s 4

Model s World s Eye s Clip s s s Window s points we create are transformed through a series of coordinate systems before being drawn on the screen. Model coordinates World coordinates Eye coordinates Clip coordinates Normalized device coordinates coordinates Window coordinates

Changing Model s World s Eye s Clip s s s Window s In most cases, we change from one coordinate system to another by using a linear transformation. Each coordinate in the new system is a linear function of the coordinates in the old system. A linear transformation can be described by matrix multiplication: X = AX. A linear transformation always maps lines to lines, i.e., collinear points to collinear points.

Affine and Projective Model s Definition (Affine Transformation) An affine linear transformation is a linear transformation that always maps Parallel lines to parallel lines. Intersecting lines to intersecting lines. World s Eye s Clip s s s Window s Definition (Projective Transformation) A projective linear transformation is a linear transformation that may map Parallel lines to intersecting lines. Intersecting lines to parallel lines.

Model s World s Most of the transformations between our coordinate systems are affine. Eye s Clip s s s Window s

Model s Model s World s Eye s Clip s s s Window s Definition ( Model System) model coordinate system is the coordinate system local to a specific object. An object is first drawn in its own model coordinate system. origin and the axes are selected for convenience relative to that object.

Examples Model s World s Eye s Clip s s s Model coordinates for a sphere. Place the origin at the center of the sphere. Model coordinates for a cube. Place the origin at one corner. Place the adjacent corners on the positive x-, y-, and z-axes. Window s

Model s for a Sphere y Model s World s x Eye s Clip s s s z Window s Model System for a Sphere

Model s for a Cube y Model s World s Eye s Clip s s x s Window s z Model System for a Cube

Examples Model s World s Eye s Clip s s What would be a good model coordinate system for a cone? What would be a good model coordinate system for a cylinder? s Window s

World s Model s World s Definition ( World System) world coordinate system is the system of coordinates used for building the 3-D scene as a single unified model. Eye s Clip s s s origin and axes are chosen for convenience. Window s

Example Model s World s Eye s Clip s Imagine a scene with four cubes spaced out in a row. Each cube has its own model coordinate system. re is only one world coordinate system. s s Window s

Five Cubes in a Row y Model s World s Eye s Clip s x s s Window s z World System for a Collection of Cubes

World s Model s World s Eye s Clip s s s Window s Linear transformations are used to move the objects from their local coordinate systems to the world coordinate system. most common ones are the following. Translations Rotations Reflections Scalings

Eye s Model s World s Eye s Clip s s s Window s Definition ( Eye System) In the eye coordinate system, the viewpoint (or eye, or camera ) is located at the origin, looking down the negative z-axis. eye coordinate determines the point of view and the direction of view. In world coordinates, the viewpoint is placed at the point from which we wish to view the scene.

Eye System y "World" Direction of view Model s World s Eye s Clip s s x s Window s Eye z Eye System

Eye s Model s World s Eye s Clip s s Linear transformations are used to move the eye from the desired viewing position in world coordinates to the origin in eye coordinates. Translations Rotations s Window s

View Frustum Model s Definition ( View Frustum) view frustum is a truncated rectangular pyramid with vertex at the eye and bases perpendicular to the line of sight. World s Eye s Clip s s s Window s view frustum is bounded by six planes. left and right planes. top and bottom planes. near and far planes.

View Frustum y Model s World s Eye s Clip s s x s Window s z View Frustum

View Frustum Model s World s Eye s Clip s s view frustum contains that part of the scene that will be visible on the computer screen. For technical reasons, the near and far planes eliminate objects that are either too near or too far away. s Window s

View Frustum y "World" Model s World s Eye s Clip s s x s Window s z World in Eye s

View Frustum y Model s x World s Eye s Clip s s z s Window s Eye View Frustum in World s

Clip s Model s World s Eye s Clip s s s Window s Eye coordinates are transformed to clip coordinates by another linear transformation. This transformation transforms the view frustum into a rectangular box. This transformation distorts angles and distances. In clip space, the GPU clips all objects, removing objects or parts of objects that are outside of the view frustum.

Clip s y Model s World s x Eye s Clip s s s Window s z Clip System

s Model s World s Eye s Clip s s s Window s Perspective division transforms clip coordinates into normalized device coordinates. result is a cube that is centered at the origin. Each dimension ranges from 1 to 1. 1 x 1 1 y 1 1 z 1

s y Model s World s x Eye s Clip s s s Window s z System

s Model s World s Eye s Clip s s viewport coordinate system is two-dimensional, with the origin in the lower-left corner. world scene in normalized device coordinates is projected onto the back face (z = 1) of the cube and then scaled. s Window s

s y Model s World s Eye s Clip s s s Window s System x

Window s Model s World s Eye s Clip s window coordinate system is like the screen coordinate system, except that origin is in the upper left corner. Increasing y is down. s s Window s

Window s x Model s World s Eye s Clip s s Window System System s Window s y Window System

Window s Model s World s Eye s Clip s s s Window s Normally, the viewport will fill the window. Thus, the x-coordinates will be the same. x view = x window. y-coordinates will run in opposite directions. y view = screen height y window.

Homework Model s World s Eye s Clip s s Homework Read Section 2.2 a brief description of the coordinate systems. Read Section 4.4 a more detailed description of the coordinate systems. s Window s