CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Three Dimensional Viewing
1 Computer Graphics Chapter 8 3D Transformations.
Projection.
Three-Dimensional Viewing Sang Il Park Sejong University Lots of slides are stolen from Jehee Lee’s.
Lecture 3 Sunday, 03 May ENGINEERING GRAPHICS 1E7 Lecture 3: Orthographic Projections.
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
CS 325 Introduction to Computer Graphics 02 / 24 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 09 / 2007 Instructor: Michael Eckmann.
Lecture 3 Sunday, 14 June ENGINEERING GRAPHICS 1E9 Lecture 2: Orthographic Projections.
CS485/685 Computer Vision Prof. George Bebis
ENGINEERING GRAPHICS 1E7
CS 376 Introduction to Computer Graphics 02 / 26 / 2007 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 06 / 2007 Instructor: Michael Eckmann.
Classical Viewing CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
3D Concepts UNIT 3. 3-D Coordinate Spaces Remember what we mean by a 3-D coordinate space x axis y axis z axis P y z x Right-Hand Reference System.
IT- 601: Computer Graphics Lecture-11 Mathematics of Projection Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
Visualization and Graphics Introduction
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
CS 325 Introduction to Computer Graphics 03 / 08 / 2010 Instructor: Michael Eckmann.
Transformation & Projection Feng Yu Proseminar Computer Graphics :
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
1 2D Transformations 几何变换. 2 What is a transformation? A transformation is an operation that transforms or changes a shape (line, drawing etc.) There.
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
Computer Graphics I, Fall 2010 Classical Viewing.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
1 Classical Viewing. 2 Objectives Introduce the classical views Compare and contrast image formation by computer with how images have been formed by architects,
CS 325 Introduction to Computer Graphics 04 / 26 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Computer Graphics Bing-Yu Chen National Taiwan University.
CS 376 Introduction to Computer Graphics 04 / 20 / 2007 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 23 / 2007 Instructor: Michael Eckmann.
Basic Projections 2D to 3D
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
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 Andries van Dam 3D Viewing I CIS 736 Computer Graphics Review of Basics 2 of 5: 3D Viewing.
CS5500 Computer Graphics March 12, 2007.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 2 of 41 William H. Hsu Department of Computing.
Geometric Transformations
Three-Dimensional Viewing
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Projection.
CS552: Computer Graphics Lecture 11: Orthographic Projection.
1 PTT 105/3: Engineering Graphics. TAXONOMY OF PLANAR GEOMETRIC PROJECTIONS PTT 105/3: Engineering Graphics 2 Planar Geometric Projections Parallel Multiview.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS 376 Introduction to Computer Graphics 02 / 21 / 2007 Instructor: Michael Eckmann.
2D Transformation Homogenous Coordinates Scale/Rotate/Reflect/Shear: X’ = XT Translate: X’ = X + T Multiple values for the same point e.g., (2, 3, 6)
RAC/RA Projection Types of Projection Simple Projections Generalized Projection.
CS 376 Introduction to Computer Graphics 02 / 14 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Lecture 19 PROJECTIONS I Taqdees A. Siddiqi
Projection. Conceptual model of 3D viewing process.
Computer Graphics Projections.
PROJECTIONS PROJECTIONS 1. Transform 3D objects on to a 2D plane using projections 2 types of projections Perspective Parallel In parallel projection,
COMPUTER GRAPHICS 1/36 Viewing 1 Viewing: Types of Projections Computer Graphics.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
PERSPECTIVE PROJECTION…...
Projection Our 3-D scenes are all specified in 3-D world coordinates
3D Viewing cgvr.korea.ac.kr.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSC461: Lecture 18 Classical Viewing
Three Dimensional Viewing
Planar Geometric Projection Classes
3D Graphics.
Viewing (Projections)
Viewing (Projections)
Presentation transcript:

CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann

Michael Eckmann - Skidmore College - CS Spring 2010 Today’s Topics Questions/comments? 3d transforms –fixed point scaling Projections –parallel and perspective projections

Michael Eckmann - Skidmore College - CS Spring d Scale w/ fixed point First transform the fixed point to the origin with a translation matrix. Then do the 3d Scale [ s x ] [ 0 s y 0 0 ] [ 0 0 s z 0 ] [ ] Then transform the origin back to the fixed point via the inverse of the first translation matrix.

Michael Eckmann - Skidmore College - CS Spring 2010 Rigid body vs. Affine Transformations that preserve line lengths and angles do not deform shapes. Therefore they are called rigid body transformations. –Translation and Rotation (and any combination of these) are examples of rigid body transformations. Transformations that preserve parallel lines, that is, lines that were parallel before the transform remain parallel after the transform are called affine transformations. –Line lengths and angles need not be preserved for a transformation to be considered affine –Rotation, Translation, Scale and Shear (and any combination of these) are examples of affine transformations.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection terminology Projection –transformation of points in a coordinate system of dimension n to a coordinate system of dimension less than n (from Foley, VanDam, Feiner, Hughes)‏ Planar Geometric Projections –planar means we're projecting onto a plane (2d) --- this plane is called the projection plane (also sometimes the view plane)‏ –geometric means we're using straight (not curved) projectors (projectors are the blue dotted lines on the slide after the next.)‏ –Many projections in cartography are non planar or non geometric. When we use the word projection from here on out, we're talking about Planar Geometric Projection.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types Breakdown of Planar Geometric Projections: –Parallel orthographic –top –front –side –axonometric isometric other oblique –cabinet –cavalier –other –Perspective one point two point three point

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types There are many subclasses of projections Projections can be either parallel or perspective. The distance between the center of projection (CoP) (= convergence point in the diagram) and the projection plane is infinity for parallel projections and is finite for perspective projections.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types Perspective projections can be 1 point, 2 point or 3 point. Diagrams below show 1 point and 2 point. 3 point perspective would occur if in the 2 point perspective diagram, the vertical lines instead of being parallel, vanished to some point (above or below). The word point here refers to a principle vanishing point.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types The 1 point perspective projection is made when one of the coordinate axes is cut by the projection plane. 2 point is when 2 coordinate axes are cut by the projection plane. And 3 point when all 3 coordinate axes are cut by the projection plane. So, in other words, the 1, 2 and 3 point projections are generated by situating the view plane such that it intersects with either 1, 2 or 3 principle axes (x, y and/or z), respectively. If we have a 1 point perspective projection and the view plane intersects with the x axis, what can we say about the relation between the view plane and the y-z plane?

Michael Eckmann - Skidmore College - CS Spring 2010 Perspective Projection Parallel lines in the world appear parallel in the projection (view plane) if they are parallel to the view plane (e.g. see vertical lines in the figure b) and c) a few slides ago.)‏ Any lines that are parallel to each other in the world, but are not parallel to the view plane will converge to a vanishing point. There are an infinity of vanishing points, because there are an infinity of line directions. There is 1 center of projection for any perspective projection.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types Parallel projections can be orthographic or oblique. Orthographic (aka orthogonal) are those that have the projectors perpendicular (normal) to the view plane. Oblique are those that have the projectors not normal to the view plane.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types Orthographic projections can be further divided into top (aka plan), front elevation, side elevation or axonometric. The top, front and side elevation projections are typically used in drafting (Engineering or Architectural drawings.) Think of a view of a building where the projectors are parallel to each other and perpendicular to the view plane and the view plane is either parallel to the top, front or side of a building, and hence only one face of the building will displayed in the view plane. Axonometric projections are orthographic and have the view plane situated so that it is not orthogonal to a principle axis. Isometric projection is the kind of axonometric projection where three faces are displayed on the view plane and the view plane cuts the 3 coordinate axes at equal distances from the origin.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types Oblique parallel projections are those that have their projectors not normal to the view plane. Two common kinds of oblique projections are cavalier and cabinet. Cavalier are those whose projector angle is 45 degrees with the projection plane. Cabinet are those whose projector angle is about 63.4 degrees (tan -1 2) with the projection plane. These appear more realistic than cavalier, because lines that are perpendicular to the viewing plane are projected at half length.

Michael Eckmann - Skidmore College - CS Spring 2010 Projection types Recap on the breakdown of Planar Geometric Projections: –Parallel (CoP at infinity)‏ orthographic (projectors normal to the view plane)‏ –top (view plane parallel to x-z plane)‏ –front –side –axonometric (see more than one face in the view plane)‏ isometric (see three faces in view plane and view plane intersects the 3 coordinate axes at the same distance from the origin.)‏ other oblique (projectors not normal to the view plane)‏ –cabinet (projector angle is 63.4 degrees)‏ –cavalier (projector angle is about 45 degrees)‏ –other –Perspective (CoP is finite)‏ one point (vanishing point only in one principle direction)‏ two point (vanishing points in two principle directions)‏ three point (vanishing points in three principle directions)‏

Michael Eckmann - Skidmore College - CS Spring 2010 Perspective Matrix Derivation Now we'll derive the matrix for a one point perspective projection onto a viewing plane that intersects the z axis. Assume that the viewing plane is at z=0 Assume that the center of projection is at (0, 0, -d)‏ Given a point in 3 space, what is its projected coordinates on the plane at z=0? Let's draw a diagram on the board.

Michael Eckmann - Skidmore College - CS Spring 2010 Perspective Matrix Derivation Using the parametric equation of a line, the line will go through CoP = (0, 0, -d) and through the point in space that we are projecting P = (x,y,z). The projected point P proj = (x proj, y proj, z proj ), lies on the z=0 plane. x proj = x + t(0-x) = x – tx y proj = y + t(0-y) = y – ty z proj = z + t(-d-z) = z – t ( d+ z) = 0, so t=z/(d+z)‏ substitute t into the x proj and y proj equations to get: x proj = x – x z / (d+z) = (dx + zx – xz) / (d+z) = x / (1 + (z/d))‏ y proj = y / (1 + (z/d))‏ How to use this information to generate a matrix that performs the perspective projection?

Michael Eckmann - Skidmore College - CS Spring 2010 One Point Perspecitve Perspective projection onto z=0 plane with CoP at (0,0,-d). [ ] [ x ] [ x ] [ ] [ y ] = [ y ] [ ] [ z ] [ 0 ] [ 0 0 1/d 1 ] [ 1 ] [ (z/d) + 1 ]

Michael Eckmann - Skidmore College - CS Spring 2010 Orthographic Projection What do you think a matrix for an orthographic projection onto the z=0 plane would look like? Orthographic means that the direction of the projectors is parallel to z-axis since the z=0 plane is orthogonal to the z- axis. The difference is that we do not have a finite CoP. Given a point in the world P = (x,y,z), what will be its projected point on the z=0 plane? So, what does the matrix look like?

Michael Eckmann - Skidmore College - CS Spring 2010 Orthographic Projection [ ] [ x ] [ x ] [ ] [ y ] = [ y ] [ ] [ z ] [ 0 ] [ ] [ 1 ] [ 1 ]