Two-Dimensional Viewing

Slides:



Advertisements
Similar presentations
มุมมองใน 2 มิติ (2-D Viewing)
Advertisements

Computer Graphics CLIPPING.
Java ThreadsGraphics Programming Graphics Programming: Windows, Viewports & Clipping.
Two-Dimensional Viewing Jehee Lee Seoul National University.
CMPE 466 COMPUTER GRAPHICS Chapter 8 2D Viewing Instructor: D. Arifler Material based on - Computer Graphics with OpenGL ®, Fourth Edition by Donald Hearn,
2D Viewing and Projection
2 D viewing Prepared by Elizabeth Isaac DCS, RSET.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 2 1.
Lecture 7 2D viewing 1 Lecture 7. 2D Viewing 2D viewing pipeline Clipping window, Normalization viewport transformation OpenGL 2D viewing functions Setup.
CHAPTER 7 2D VIEWING CGMB214: Introduction to Computer Graphics.
Output Primitives Computer Graphics.
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphics Two Dimensional Viewing Dr. Eng. Farag Elnagahy
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.
2D Viewing. 2D viewing transformation is a mapping of world coordinate scene to device coordinates xw min xw max yw min yw max xv min xv max yv min yv.
1 CMT Fundamentals of Computer Graphics Revision Dr. Xiaohong Gao BG---Room 2C23 Week 11.
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
Two Dimensional Viewing
3D Viewing.
Camera. Content Coordinate systems and transformations Viewing coordinates Coordinate transformation matrix Projections Window and viewport Acknowledgments:
2 DIMENSIONAL VIEWING Ceng 477 Introduction to Computer Graphics Fall Computer Engineering METU.
1 Computer Graphics Week9 -3D Geometric Transformation.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 1 1.
Unit – IV 2D Viewing. 2 of 30 Contents Windowing Concepts The viewing pipeline viewing coordinate reference frame, window to view-port coordinate transformation,
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
1.2: Transformations CCSS
CS552: Computer Graphics Lecture 6: Viewing in 2D.
Number of Instructional Days: 13.  Standards: Congruence G-CO  Experiment with transformations in the plane  G-CO.2Represent transformations in the.
A.Aruna/Assistant Professor/SNSCE
1 By Dr. HANY ELSALAMONY.  We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations.
Perspective View Volume View Volume Far Near Window Far Near Window Center of Projection Center of Projection (a) Original Orientation (b) After Transformation.
Chapter: Viewing.
3 DIMENSIONAL VIEWING Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Lecture 9 From Vertices to Fragments. Objectives Introduce basic implementation strategies Clipping Rasterization hidden-surface removal.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Clipping.
Two-Dimensional Viewing Hearn & Baker Chapter 6
Three Dimensional Viewing
Lecture 5 Basic geometric objects
Computer Graphic 2 D Viewing.
Viewing Viewing and viewing space (camera space)
Computer Graphics CC416 Week 14 3D Graphics.
11. Viewing Transformations
Computer Graphics CC416 Week 13 Clipping.
Transformations contd.
3D Viewing cgvr.korea.ac.kr.
Graphics Fundamentals
Computer Graphics Viewing
CSCE 441 Computer Graphics 3-D Viewing
2D Viewing & Clipping 한신대 류승택
2D Viewing Pipeline.
3D Transformation Pipeline
Lecture 18 Fasih ur Rehman
Line and Character Attributes 2-D Transformation
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
WINDOWING AND CLIPPING
Three Dimensional Viewing
OpenGL 2D Viewing Pipeline
o عَلَّمَهُ الْبَيَانَ
Three-Dimensional Viewing
WINDOWING AND CLIPPING
Chapter V Vertex Processing
3D Graphics.
Two Dimensional Viewing and Clipping.
CSE 411 Computer Graphics Lecture #8 2D Viewing
Window to Viewport Transformations
3D Viewing.
THREE-DIMENSIONAL VIEWING II
THREE-DIMENSIONAL VIEWING
Presentation transcript:

Two-Dimensional Viewing Example: Graphic program which draw an entire building by an architect but we only interested on the ground floor Map of sales for entire region but we only like to know from certain region of the country. 1

Two-Dimensional Viewing When we interested to display certain portion of the drawing, enlarge the portion, windowing technique is used Technique for not showing the part of the drawing which one is not interested is called clipping An area on the device (ex. Screen) onto which the window will be mapped is called viewport. Window defines what to be displayed. A viewport defines where it is to be displayed. Most of the time, windows and viewports are usually rectangles in standard position(i.e aligned with the x and y axes). In some application, others such as general polygon shape and circles are also available However, other than rectangle will take longer time to process. 2

Viewing Transformation Viewing transformation is the mapping of a part of a world- coordinate scene to device coordinates. In 2D (two dimensional) viewing transformation is simply referred as the window-to-viewport transformation or the windowing transformation. Mapping a window onto a viewport involves converting from one coordinate system to another. If the window and viewport are in standard position, this just involves translation and scaling. if the window and/or viewport are not in standard, then extra transformation which is rotation is required. 3

Viewing Transformation y-world y-view window window 1 x-view 1 x-world world Normalised device 4

Window-To-Viewport Coordinate Transformation Window-to-Viewport transformation 5

Window-To-Viewport Coordinate Transformation . YWmax YVmax xw,yw xv,yv YWmin YVmin XVmin XVmax XWmin XWmax 6

Window-To-Viewport Coordinate Transformation xv - xvmin = xw - xwmin xvmax - xvmin xwmax - xwmin   yv – yvmin = yw - ywmin yvmax – yvmin ywmax - ywmin From these two equations we derived xv = xvmin + (xw – xwmin)sx yv = yvmin + (yw – ywmin)sy where the scaling factors are   sx = xvmax – xvmin sy = yvmax - yvmin xwmax – xwmin ywmax - ywmin 7

The sequence of transformations are: Window-To-Viewport Coordinate Transformation The sequence of transformations are: 1. Perform a scaling transformation using a fixed-point position of (xwmin,ywmin) that scales the window area to the size of the viewport. 2. Translate the scaled window area to the position of the viewport. 8

Window-To-Viewport Coordinate Transformation Relative proportions of objects are maintained if the scaling factors are the same (sx = sy). Otherwise, world objects will be stretched or contracted in either x or y direction when displayed on output device. How about character strings when map to viewport? maintains a constant character size (apply when standard character fonts cannot be changed). If character size can be changed, then windowed will be applied like other primitives. For characters formed with line segments, the mapping to viewport is carried through sequence of line transformations . 9

Viewport-to-Normalized Device Coordinate Transformation From normalized coordinates, object descriptions can be mapped to the various display devices When mapping window-to-viewport transformation is done to different devices from one normalized space, it is called workstation transformation. 10

The Viewing Pipeline 11