University of Palestine Computer Graphics ITGD3107 Prepare: Mohammed J. el-masre Nidal M. El-Borbar Supervision:

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Three Dimensional Viewing
1 View Shandong University Software College Instructor: Zhou Yuanfeng
Three-Dimensional Viewing Sang Il Park Sejong University Lots of slides are stolen from Jehee Lee’s.
Introduction to constructive graphics Basic ideas - Coordinate systems - Graphics viewing pipeline.
Now Playing: Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005.
Viewing Doug James’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals of Computer Graphics, Chap 7 Wen-Chieh (Steve) Lin Institute of Multimedia.
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.
Computer Graphics University of Palestine Dr. Sana’a Wafa Al-Sayegh
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
1 of 23 New Lecture And Lab Information Lectures: –Thursday 12:00 – 13:00 (room tba) –Friday 15:00 – 16:00 (A28) Labs: –Wednesday 10:00 – 11:00 (A305)
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD3107 University of Palestine.
Advanced Computer Graphics Three Dimensional Viewing
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
Transformation & Projection Feng Yu Proseminar Computer Graphics :
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics Bing-Yu Chen National Taiwan University.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
University of North Carolina at Greensboro
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
The Camera Analogy ► Set up your tripod and point the camera at the scene (viewing transformation) ► Arrange the scene to be photographed into the desired.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Three-Dimensional Viewing
PARALLEL PROJECTION PROJECTION MAPPING METHODS OF PROJECTION PARALLEL PROJECTION.
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,
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Viewing and Projection
Viewing and Projection
CS552: Computer Graphics Lecture 11: Orthographic Projection.
CS-321 Dr. Mark L. Hornick 1 Three-Dimensional Graphics Problem How can you effectively display 3-D information on a 2-D display?
Technion - Israel Institute of Technology Faculty of Mechanical Engineering Laboratory for CAD & Lifecycle Engineering Lab 9: 3D & Projections Basics.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Coordinate Systems Lecture 20 Wed, Oct 15, Object Coordinates Each object has its own “local” coordinate system, called object coordinates. Normally.
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
Outline 3D Viewing Required readings: HB 10-1 to 10-10
Computer Graphics Projections.
3 DIMENSIONAL VIEWING Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Three Dimensional Viewing
Rendering Pipeline Fall, 2015.
University of North Carolina at Greensboro
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
3D Computer Graphics (3080/GV10) Week 5-6 Tutorial 3
Computer Graphics Viewing
CSCE 441 Computer Graphics 3-D Viewing
2D Viewing Pipeline.
Unit 4 3D Viewing Pipeline Part - 2
CSC461: Lecture 19 Computer Viewing
Three Dimensional Viewing
OpenGL 2D Viewing Pipeline
Computer Graphics Imaging
Computer Graphics (Spring 2003)
3D Graphics.
Viewing (Projections)
THREE-DIMENSIONAL VIEWING
Presentation transcript:

University of Palestine Computer Graphics ITGD3107 Prepare: Mohammed J. el-masre Nidal M. El-Borbar Supervision: Dr. Sana'a Presentation name : Three Dimensional Viewing

Contents 3D Viewing Camera Analogy Viewing Pipeline Camera Modeling w/ OpenGL Projections Types of Projections Perspective Projection Parallel Projection Projection Matrix Projection of Lines 3D Viewing with OpenGL Matrix Modes Three Dimensional Viewing

3D Viewing The steps for computer generation of a view of a three dimensional scene are somewhat analogous to the processes involved in taking a photograph.

Camera Analogy Position Orientation Window (aperture) of the camera 1. Viewing position 2. Camera orientation 3. Size of clipping window

Viewing Pipeline The general processing steps for modeling and converting a world coordinate description of a scene to device coordinates:

Viewing Pipeline 1. Construct the shape of individual objects in a scene within modeling coordinate, and place the objects into appropriate positions within the scene (world coordinate).

Viewing Pipeline World coordinate positions are converted to viewing coordinates.

Viewing Pipeline Convert the viewing coordinate description of the scene to coordinate positions on the projection plane.

Viewing Pipeline Positions on the projection plane, will then mapped to the Normalized coordinate and output device.

Camera Modeling w/ OpenGL glMatrixMode(GL_MODELVIEW)... glMatrixMode(GL_PROJECTION)... glViewport(0,0,xres,yres) camera coordinate system viewport coordinate system device/screen coordinate system

Projections Once the view volume is determined, a projection transformation will convert the object in the 3D view volume to a 2D image on the projection plane.

Types of Projections Perspective Projection Parallel Projection

Perspective Projection (1/2) Give a realistic view of 3D objects, but does not preserve shape of object or scale Perspective images of parallel lines not parallel with projection plane converge to a point called vanishing point Size of object is diminished with distance Used in architectural, engineering, industrial design, and advertising drawings

Perspective Projection (2/2) 3-point perspective 1-point perspective 2-point perspective Most popular

Parallel Projection Accurate and same-scale measurements Not realistic, and may require multiple projections to get a complete feeling of the object Used in drawings of machine parts and in working architectural drawings

Oblique Parallel Projection (3/3) Isometric cavaliercabinet Multi-view orthographic

Projection Matrix (1/3) xpypd1xpypd1 xyz1xyz1 = M per/ort /d 0 M per = d M ort = P p (x p,y p,d) = ??? P(x,y,z) d COP z x y

Projection Matrix (2/3) xpyp01xpyp01 xyz1xyz1 = M per/ort /d 1 M per = M ort = P(x,y,z) d P p (x p,y p,0) = ??? COP z x y

Projection Matrix (3/3) P(x,y,z) d P p (x p,y p,0) = ??? COP z x or y Q (a, b, c) 1 0 –a/c da/c 0 1 –b/c db/c 0 0 –d/Q/c d 2 /Q/c+d 0 0 –1/Q/c d/Q/c+1 M general =

Projection of Lines d COP z x y Parametric representation of a line that goes through P(p x, p y, p z ) and has direction c = (c x, c y, c z ) l(t) = P+ct where t  (- , +  ) The projected line is x(t) = d(p x +c x t)/(p z +c z t) y(t) = d(p y +c y t)/(p z +c z t) If the original line is parallel to the projection plane (c z = 0) x(t) = d(p x +c x t)/p z, y(t) = d(p y +c y t)/p z, the slope of the projected line is c y /c x, independent of the position of the original line. The projected lines of parallel lines must be parallel

3D Viewing with OpenGL Viewing transformation: set the position and orientation of the viewpoint Modeling transformation: set the orientation of the model (translate, rotate, scale) Projection transformation: set the view volume and do the projection Viewport transformation: Set the viewport on the computer screen where the scene will be drawn

Matrix Modes Modelview matrix Set the viewpoint and object location by modifying this matrix glMatrixMode(GL_MODELVIEW) If projection matrix is modified Specify the view volume by modifying this matrix glMatrixMode(GL_PROJECTION) If texture matrix is modified glMatrixMode(GL_TEXTURE)

References & External links / zip _computer_graphics_c_version_2ed_-_hearn__baker.pdf Our Book computer_graphics_c_version_2ed