Introduction to 2D and 3D Computer Graphics Mastering 2D & 3D Computer Graphics Pipelines

Similar documents
Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

TWO-DIMENSIONAL TRANSFORMATION

CS 4204 Computer Graphics

Geometry for Computer Graphics

INTRODUCTION TO RENDERING TECHNIQUES

Introduction to Computer Graphics

Geometric Camera Parameters

Given a point cloud, polygon, or sampled parametric curve, we can use transformations for several purposes:

A Short Introduction to Computer Graphics

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Affine Transformations

Realtime 3D Computer Graphics Virtual Reality

Geometric Transformation CS 211A

Fundamentals of Computer Animation

Lecture Notes, CEng 477

Chapter 6. Linear Transformation. 6.1 Intro. to Linear Transformation

Cabri Geometry Application User Guide

CS 4204 Computer Graphics

Pro/ENGINEER Wildfire 4.0 Basic Design

Essay 5 Tutorial for a Three-Dimensional Heat Conduction Problem Using ANSYS Workbench

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science. Friday 18 th January 2008.

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

2D Geometric Transformations

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

521493S Computer Graphics. Exercise 2 & course schedule change

Geometry of Vectors. 1 Cartesian Coordinates. Carlo Tomasi

Tutorial: Biped Character in 3D Studio Max 7, Easy Animation

Basic Understandings

Essential Mathematics for Computer Graphics fast

Vector storage and access; algorithms in GIS. This is lecture 6

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

2D Geometrical Transformations. Foley & Van Dam, Chapter 5

Basic controls of Rhinoceros 3D software

COMP-557: Fundamentals of Computer Graphics McGill University, Fall 2010

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Volumes of Revolution

Geometric Transformations

SOEM 024: Computer Aided Design. E. Rozos

The purposes of this experiment are to test Faraday's Law qualitatively and to test Lenz's Law.

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

An introduction to 3D draughting & solid modelling using AutoCAD

Triangle Scan Conversion using 2D Homogeneous Coordinates

A System for Capturing High Resolution Images

Kankakee Community College

Welcome to CorelDRAW, a comprehensive vector-based drawing and graphic-design program for the graphics professional.

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

x1 x 2 x 3 y 1 y 2 y 3 x 1 y 2 x 2 y 1 0.

1 Symmetries of regular polyhedra

Sketcher. Preface What's New? Getting Started Basic Tasks Customizing Workbench Description Glossary Index

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

CLOUD DIGITISER 2014!

Examples. Pac-Man, Frogger, Tempest, Joust,

Introduction to Computer Graphics. Reading: Angel ch.1 or Hill Ch1.

Mastercam X6 Basic 3D Design

Programming 3D Applications with HTML5 and WebGL

To draw a line. To create a construction line by specifying two points

Blender 3D: Noob to Pro/Die Another Way

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

SimLab 3D PDF. Settings

Lecture 7. Matthew T. Mason. Mechanics of Manipulation. Lecture 7. Representing Rotation. Kinematic representation: goals, overview

SimFonIA Animation Tools V1.0. SCA Extension SimFonIA Character Animator

13.4 THE CROSS PRODUCT

A. OPENING POINT CLOUDS. (Notepad++ Text editor) (Cloud Compare Point cloud and mesh editor) (MeshLab Point cloud and mesh editor)

PRACTICAS DE AUTOCAD LIMAC 1 PRACTICE CHAIR

AutoCAD i 3D Samordningsmodell Tips og Triks for tegning i 3D med AutoCAD

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

AutoCAD New Icon Quick Reference

CPIT-285 Computer Graphics

CATIA Drafting TABLE OF CONTENTS

Lecture 9: Geometric map transformations. Cartographic Transformations

CIM Computer Integrated Manufacturing

3D Tranformations. CS 4620 Lecture 6. Cornell CS4620 Fall 2013 Lecture Steve Marschner (with previous instructors James/Bala)

Computer Graphics. Introduction. Computer graphics. What is computer graphics? Yung-Yu Chuang

IT 386: 3D Modeling and Animation. Review Sheet. Notes from Professor Nersesian s IT 386: 3D Modeling and Animation course

MMGD0203 Multimedia Design MMGD0203 MULTIMEDIA DESIGN. Chapter 3 Graphics and Animations

Solving Simultaneous Equations and Matrices

Chapter 6 - The Scene Graph

Chapter 6 - The Scene Graph

CATIA Basic Concepts TABLE OF CONTENTS

Introduction to CATIA V5

Geant4 Visualization. Andrea Dotti April 19th, 2015 Geant4 M&C+SNA+MC 2015

Lectures notes on orthogonal matrices (with exercises) Linear Algebra II - Spring 2004 by D. Klain

Visualization of 2D Domains

Transformations in the pipeline

SketchUp Instructions

Last lecture... Computer Graphics:

3D Analysis and Surface Modeling

GeoGebra. 10 lessons. Gerrit Stols

Scan-Line Fill. Scan-Line Algorithm. Sort by scan line Fill each span vertex order generated by vertex list

Learning Autodesk. Modeling, Analysis and Animation SDC. Randy H. Shih. Better Textbooks. Lower Prices. PUBLICATIONS

Geometric Modelling & Curves

Transformations Worksheet. How many units and in which direction were the x-coordinates of parallelogram ABCD moved? C. D.

Blender 3D Animation

Maya 2014 Basic Animation & The Graph Editor

G.H. Raisoni College of Engineering, Nagpur. Department of Information Technology

1 CHORD LENGTH OR UNIFORM PARAMETERIZATION

Transcription:

Introduction to 2D and 3D Computer Graphics Mastering 2D & 3D Computer Graphics Pipelines CS447 3-1

Mastering 2D & 3D Graphics Overview of 2D & 3D Pipelines What are pipelines? What are the fundamental components of pipelines? Example pipelines... CS447 3-2...2D graphic object pipeline...3d graphic object pipeline...raster pipeline...bitmapped, HLHSR, illumination implications

Overview of 2D & 3D Pipelines What are Pipelines? Are the fundamental concept around which graphics systems are based Represent conceptual models Describe the interaction and the flow of data for all functions Illustrate how the applications can create, save, modify, draw, and display pictures CS447 3-3

Overview of 2D & 3D Pipelines What are Pipelines? Illustrate how applications can create pictures Illustrate the use of functions to set up the environment Illustrate how the environment affects pictures being created Illustrate the interactions and the relationships between functions CS447 3-4

Overview of 2D & 3D Pipelines What are the fundamental components? Common components: Attribute Association Display-List Storage Bundled Attribute Association Modeling Viewing & Clipping Rendering» with many sub-components! CS447 3-5

Overview of 2D & 3D Pipelines Attribute Association: pipeline illustration Graphic objects with associated attributes; for example: Primitive Attributes, ASF Bundle Indicators, Bundle Indices, Width/Size Specification Mode, Object Clipping Mode, Transparency, Drawing Mode, Auxiliary Colour, Pick Identifier, Transformation (initially identity), Clip Identifier, and Clip Region. Primitives Associate Graphic Objects CS447 3-6 Attribute values stored in State Lists

Overview of 2D & 3D Pipelines Bundled Attribute Association Attributes set and accessed through tables......are called bundled attributes...are grouped into bundle tables...can change the attributes associated with a graphic object as it flows along the pipeline CS447 3-7

Overview of 2D & 3D Pipelines Display-List Storage Segment models...(e.g., CGI, GKS)...describe the mechanism for saving graphic objects Structure models...(e.g., PHIGS)...describe the mechanism for saving primitive and complex elements Macro & procedure models...(e.g., POSTSCRIPT ) describe the mechanism for saving macros, CS447 3-8 procedures, & subroutines in memory for later use

One Approach to Display Lists using segments Attribute Association Segment Open No Segment Open Bundled Attribute Association Attributes Segment Storage Objects Being Copied Objects Being Displayed Apply Inheritance Filters Associate Copy Transformation by Concatenation Without Segment Transform Segment Transformation Associate by Concatenation Associate Segment Attributes of Highlighting and Display Priority CS447 3-9

Or, with Structures... Structure Creation: data definition process Workstation Independent Application Program:...functions that create elements: SET POLYLINE COLOUR INDEX (Red) SET LINEWIDTH SCALE FACTOR(Wide) SET LINETYPE(Dashed) POLYLINE 3 ( )...these functions cause elements to flow along the pipeline and into centralized structure storage: set polyline colour index (red) set linewidth scale factor (wide) set linetype (dashed) polyline 3 ( ) CS447 3-10

Overview of 2D & 3D Pipelines Example: 3D graphic object pipeline Data Definition Process Display Process... workstation independent Display Process... workstation dependent Centralized Structure Store Modeling Viewing & View Clipping Associate Attributes Associate bundled attributes Rendering CS447 3-11

Overview of 2D & 3D Pipelines Modeling Modeling transformations......allow objects to be defined in their own coordinate system Through modeling......objects are transformed into world coordinates by scaling, rotation, and/or translation CS447 3-12

Overview of 2D & 3D Pipelines Modeling This allows all objects to initially be defined as centered around the origin......and then modeling transformations can position, orient, and scale them into their correct geometric relationships This stage in the pipeline is independent of the display characteristics CS447 3-13

Overview of 2D & 3D Pipelines Modeling CS447 3-14 The modeling transformation......maps modeling coordinates into world coordinates...is defined by transformation matrices inserted into a structure network...allows the picture to be composed of separate parts, each defined within its own modeling coordinate system...supports relative positioning of these parts when they are mapped to world coordinates

Overview of 2D & 3D Pipelines Modeling CS447 3-15 Modeling Coordinates (called MC) are....3d right-handed device-independent coordinates... specified by a homogeneous transformation matrix When modeling transformations are not inserted into a structure......modeling coordinates are the same as world coordinates

Mastering 2D & 3D Graphics Coordinate Spaces 2D transformations are represented by 3X3 matrices using homogeneous coordinates... 3D transformations are represented by 4x4 matrices using homogeneous coordinates in 3-space CS447 3-16

Mastering 2D & 3D Graphics Coordinate Spaces: homogeneous coordinates What are homogeneous coordinates? Well...instead of representing a point as (x,y,z)......we represent it as (x,y,z,w)...but we most commonly refer to it as (x/w, y/w, z/w, 1) When we transform a point to this form......it is called homogenizing CS447 3-17

Mastering 2D & 3D Graphics Coordinate Spaces: homogeneous coordinates This means...that each point in 3-space is represented by a line through the origin in 4-space! So...homogenizing allows us to use points that form a 3D subspace of 4-space (i.e., W=1) CS447 3-18

Mastering 2D & 3D Graphics Coordinate Spaces: right-handed Most graphics systems use the right-handed coordinate system for the definition of objects In right-handed systems......positive rotations occur when looking from the positive axis to the origin...a 90 counterclockwise rotation will transform one positive axis into the other CS447 3-19

Mastering 2D & 3D Graphics Coordinate Spaces: right-handed For example, to rotate around the x axis......the positive rotation is from y to z Or, to rotate around the y axis......the positive rotation is from z to x And lastly, to rotate around the z axis......the positive rotation is from x to y CS447 3-20

Mastering 2D & 3D Graphics Coordinate Spaces: left-handed Some graphics systems use the left-handed coordinate system for viewing objects... CS447 3-21 Left-handed systems may seem more natural......as larger z values appear further from the operator In left-handed systems......positive rotations occur when looking from the positive axis to the origin...a 90 clockwise rotation will transform one positive axis into the other

Mastering 2D & 3D Graphics Coordinate Spaces Right-Handed Left-Handed Y Y X Z Z Z is coming out of the display towards you X Z is heading into the display (or away from you) CS447 3-22

Mastering 2D & 3D Graphics Linear Transformations A set of vertices or 3D points belonging to an object......can be transformed into another set of points...using linear transformations CS447 3-23

Mastering 2D & 3D Graphics Linear Transformations Translation: 1 0 0 0 [x' y' z' 1] = [x y z 1] 0 1 0 0 0 0 1 0 Tx Ty Tz 1 Translation means... x' = x + Tx y' = y + Ty z' = z + Tz CS447 3-24

Mastering 2D & 3D Graphics Linear Transformations Scaling: Sx, Sy, and Sz are scaling factors Sx 0 0 0 [x' y' z' 1] = [x y z 1] 0 Sy 0 0 0 0 Sz 0 0 0 0 1 When Sx = Sy = Sz, there is uniform scaling......otherwise scaling occurs only along the axes specified CS447 3-25 x' = xsx y' = ysy z' = zsz

Mastering 2D & 3D Graphics Linear Transformations To rotate an object in three-dimensional space, an axis of rotation must be specified......it is best to use one of the coordinate axes Counterclockwise rotation about each of the axes uses (around X, Y, Z respectively) 1 0 0 0 cos 0 -sin 0 cos sin 0 0 0 cos sin 0 0 1 0 0 -sin cos 0 0 0 -sin cos 0 sin 0 cos 0 0 0 1 0 CS447 03-26 0 0 1 0 0 0 1 0 0 0 1

Mastering 2D & 3D Graphics Linear Transformations Around the Z axis, this means: x' = xcos -ysin y' = xsin +ycos z' = z CS447 3-27

Mastering 2D & 3D Graphics Linear Transformations When objects are not at the origin......a simple rotation will not rotate the object in place Instead, we must......first translate the object to the origin,...apply the desired rotation, and...translate the object back to its original position CS447 3-28

Mastering 2D & 3D Graphics Linear Transformations This means for a rotation around the Z axis (when the Z axis passes through the point (Tx, Ty, 0))... x' = xcos - ysin - Txcos + Tysin + Tx y' = xsin + ycos - Txsin - Tycos + Ty z' = z CS447 3-29

Mastering 2D & 3D Graphics Concatenating Transformations CS447 3-30 Useful in describing objects that have a natural hierarchy For example, a stylization of a human figure used in animation would......have a set of local coordinate systems based on limb joints...describe a hierarchy based on these joints...allow the hand to move with respect to the wrist joint and the lower arm to move with respect to the elbow joint

Modeling Transformations Composition: Concatenating Xforms With Preconcatenate......the specified transformation is applied to the object first...if you preconcatenate a rotation, that rotation will be applied to the object before the other transformations Current xform x New (L'=LxM) CS447 3-31

Modeling Transformations Composition: Concatenating Xforms With Postconcatenate......the specified transformation is applied to the object after the current existing local transformation New x Current Xform (L'=MxL) CS447 3-32

Modeling Transformations Composition: Inheritance Inheritance of modeling transformations means... CS447 3-33...a parent's composite modeling transformation becomes the initial child's global modeling transformation...a child's initial local modeling transformation is the identity matrix...descendant structures do not affect parent structures

Modeling Transformations Composition: Inheritance Modifications... CS447 3-34 to the global transformation only have effect within the structure in which they are encountered This allows structure hierarchies to be built with movable parts......since the motion of the parent structure is passed to its children via inheritance of the composite modeling transformation, the parts are kept connected

When B is called, A's composite transformation becomes B's global transformation B's initial local transformation is identity When D, C, or E are called, these transformations are saved When control is returned to B, these transformations are restored Inheritance... A Initial identity local & global transformations When B, D, or F are called, these transformations are saved When control is returned to A, these transformations are restored B D F C E H I CS447 3-35

2D Viewing Transformations View Orientation Transformation View orientation transformation......defines the position and orientation of view reference coordinates relative to world coordinates Y V U CS447 3-36 X View Up Vector View Reference Point

2D Viewing Transformations View Mapping Transformation View mapping transformation......defines the mapping of view reference coordinates to normalized projection coordinates, allowing for distortion... (0,1) (0,0) (1,0) CS447 3-37 View Window in VRCs Projection Viewport in NPCs

2D Viewing Transformations View Mapping Transformation Allows dynamic horizontal and vertical panning......by continuously adding to both sides of the view window, or...by changing the view reference point and leaving the view window unchanged Remember, panning is achieved by changing the window location! CS447 3-38

CS447 3-39 2D Viewing Transformations View Mapping Transformation

2D Viewing Transformations View Mapping Transformation Allows dynamic zooming......by continuously changing the view window by a uniform percentage in the horizontal and vertical directions CS447 3-40

2D Viewing Transformations View Mapping Transformation Allows dynamic rotation......by continuously changing the view up vector The effect is as if you were rotating a camera used to view your picture CS447 3-41

Overview of 2D & 3D Pipelines 3D Viewing & Clipping Three operations are associated with 3D viewing... CS447 3-42...view orientation...view mapping...xyz clipping View orientation......maps world coordinates to view reference coordinates...transforms and defines the position and orientation of the VRCs relative to world coordinates

Overview of 2D & 3D Pipelines 3D Viewing & Clipping View mapping... CS447 3-43...maps view reference coordinates to normalized projection coordinates...specifies a 3D volume of VRC to be mapped to a 3D volume of NPC (a unit cube extending from 0.0 to 1.0 in X,Y,Z) XYZ clipping......is performed on the XY boundary (or clip rectangle), and front and back planes

Overview of 2D & 3D Pipelines Rendering Is the general process for changing a 2D or 3D graphic object to a shaded 2D projection onto a drawing surface Rendering involves......setting up data structures for polygon mesh models to ensure that they will contain all of the information required in the shading process CS447 3-44

CS447 3-45 Overview of 2D & 3D Pipelines Rendering Rendering also involves......setting up data structures for polygon mesh models to ensure that they will contain all of the information required in the shading process...culling back-facing polygons (3D Only)...applying a hidden surface removal algorithm(3d Only)...scan converting or rasterizing polygons: converting an object's vertices into a set of pixel coordinates & shading

Overview of 2D & 3D Pipelines Example: 2D graphic object pipeline Viewing and Rendering Drawing Surface Clip Rectangle and Clip Indicator Colour Table Render Abstractly Apply Associated Clipping Apply Drawing Surface Clipping Apply Colour Table Echo Apply Associated Transformation Apply VDC-to-Device Mapping Render Physically Apply Implicit Display Transformation Drawing Surface Point Set in Real-Valued VDC Space, with associated: Transformation, Clip Indicator, Clip Rectangle, Object Clipping Mode Colour Attributes, Transparency, and CS447 3-46 Drawing Mode Point Set in Real-Valued DC Space with associated: Colour Attributes, Transparency, and Drawing Mode Device-Specific Rendered Picture Representation with associated: Colour value