EF432. Introduction to spagetti and meatballs

Similar documents
Topic 0. Introduction: What Is Computer Graphics? CSC 418/2504: Computer Graphics EF432. Today s Topics. What is Computer Graphics?

EF432. Introduction to spagetti and meatballs

0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves

CSCD18: Computer Graphics. Instructor: Leonid Sigal

COMP371 COMPUTER GRAPHICS

From Ver(ces to Fragments: Rasteriza(on

Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Rendering. A simple X program to illustrate rendering

CS 4731: Computer Graphics Lecture 21: Raster Graphics: Drawing Lines. Emmanuel Agu

Rendering. A simple X program to illustrate rendering

CS 543: Computer Graphics. Rasterization

CHAPTER 1 Graphics Systems and Models 3

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

Lecturer Athanasios Nikolaidis

The Traditional Graphics Pipeline

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Line Drawing. Foundations of Computer Graphics Torsten Möller

Scan Conversion. Drawing Lines Drawing Circles

Introduction to Computer Graphics. Knowledge basic concepts 2D and 3D computer graphics

Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

The Traditional Graphics Pipeline

Computer Graphics Introduction. Taku Komura

CSCI 420 Computer Graphics Lecture 14. Rasterization. Scan Conversion Antialiasing [Angel Ch. 6] Jernej Barbic University of Southern California

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Lahore University of Management Sciences. CS 452 Computer Graphics

Computer Graphics Disciplines. Grading. Textbooks. Course Overview. Assignment Policies. Computer Graphics Goals I

CIS 581 Interactive Computer Graphics (slides based on Dr. Han-Wei Shen s slides) Requirements. Reference Books. Textbook

Rasterization. Rasterization (scan conversion) Digital Differential Analyzer (DDA) Rasterizing a line. Digital Differential Analyzer (DDA)

Computer Graphics. Instructor: Oren Kapah. Office Hours: T.B.A.

Computer Graphics. - Rasterization - Philipp Slusallek

History of computer graphics

Realtime 3D Computer Graphics Virtual Reality

Computer Graphics (CS 543) Lecture 10: Rasterization and Antialiasing

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Computer Graphics

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

Animation & Rendering

Announcements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics

Computer Graphics I Lecture 11

Course Title: Computer Graphics Course no: CSC209

CIS 581 Interactive Computer Graphics

Department of Computer Sciences Graphics Fall 2003 (Lecture 2) Pixels

The Traditional Graphics Pipeline

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Line Drawing. Introduction to Computer Graphics Torsten Möller / Mike Phillips. Machiraju/Zhang/Möller

Lahore University of Management Sciences. CS 452 Computer Graphics

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Graphics and Interaction Rendering pipeline & object modelling

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

CS451Real-time Rendering Pipeline

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics 1/15

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Einführung in Visual Computing

Cs602-computer graphics MCQS MIDTERM EXAMINATION SOLVED BY ~ LIBRIANSMINE ~

3D GRAPHICS. design. animate. render

CSE328 Fundamentals of Computer Graphics: Concepts, Theory, Algorithms, and Applications

Chapter 7 - Light, Materials, Appearance

Lecture 0 of 41: Part A Course Organization. Introduction to Computer Graphics: Course Organization and Survey

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

CS380: Computer Graphics Introduction. Sung-Eui Yoon ( 윤성의 ) Course URL:

Introduction to Visualization and Computer Graphics

Topic #1: Rasterization (Scan Conversion)

CS5620 Intro to Computer Graphics

Introduction to 3D Graphics

CS559 Computer Graphics Fall 2015

Topics and things to know about them:

CS 130 Final. Fall 2015

CS2401 COMPUTER GRAPHICS ANNA UNIV QUESTION BANK

CS452/552; EE465/505. Clipping & Scan Conversion

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Chapter 8: Implementation- Clipping and Rasterization

From Vertices To Fragments-1

Scan Conversion. CMP 477 Computer Graphics S. A. Arekete

CS 130 Exam I. Fall 2015

Computer Graphics. CS52 Fall computer graphics introduction 2006 fabio pellacini 1

COMP30019 Graphics and Interaction Rendering pipeline & object modelling

Lecture outline. COMP30019 Graphics and Interaction Rendering pipeline & object modelling. Introduction to modelling

Computer Graphics. CS52 Winter computer graphics introduction 2008 fabio pellacini 1. introduction

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Raster Displays and Scan Conversion. Computer Graphics, CSCD18 Fall 2008 Instructor: Leonid Sigal

RASTERIZING POLYGONS IN IMAGE SPACE

Rasterization: Geometric Primitives

Graphics (Output) Primitives. Chapters 3 & 4

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

Overview: Ray Tracing & The Perspective Projection Pipeline

CS602 MCQ,s for midterm paper with reference solved by Shahid

Surface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6

Overview of Computer Graphics

Pipeline Operations. CS 4620 Lecture 14

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY CS2401 COMPUTER GRAPHICS QUESTION BANK

Computer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk

Welcome to 6.837! Welcome to all students: Plan for today: Introductions. Why study graphics? Team 18 s final project from 6.

REYES REYES REYES. Goals of REYES. REYES Design Principles

Chapter - 2: Geometry and Line Generations

Some Resources. What won t I learn? What will I learn? Topics

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

CS337 INTRODUCTION TO COMPUTER GRAPHICS. Describing Shapes. Constructing Objects in Computer Graphics. Bin Sheng Representing Shape 9/20/16 1/15

Transcription:

EF432 Introduction to spagetti and meatballs

CSC 418/2504: Computer Graphics Course web site (includes course information sheet): http://www.dgp.toronto.edu/~karan/courses/418/ Instructors: L2501, T 6-8pm L0101, W 3-5pm Karan Singh David Levin BA 5258 BA 5268 978-7201 978-2052 karan@dgp.toronto.edu diwlevin@cs.toronto.edu office hours: T 5-6pm or by appointment. office hours: W 2-3pm or by appointment. Textbooks: Fundamentals of Computer Graphics OpenGL Programming Guide & Reference Tutorials: (first tutorial next week)

Topics 0. Introduction: What is Computer Graphics? 1. Basics of scan conversion (line drawing) 2. Representing 2D curves 3. 2D Transformations 4. Coordinate Free Geometry CFG 5. 3D Objects 6. 3D curve design 7. 3D Transformations 8. 3D Viewing 9. Visibility 10. Lighting and local illumination 11. Shading 12. Texture mapping 13. Ray Tracing and Global illumination 14. Animation

Topic 0. Introduction: What Is Computer Graphics?

What is Computer Graphics? Computers: accept, process, transform and present information. Computer Graphics: accept, process, transform and present information in a visual form.

Ok but what is the course really about? The science of turning the rules of geometry, motion and physics into (digital) pictures that mean something to people What its not about? Photoshop, AutoCAD, Maya, Renderman, Graphics APIs. wow, heavy math and computer science!!

Movies Movies define directions in CG Set quality standards Driving medium for CG

Games Games emphasize the interactivity and AI Push CG hardware to the limits (for real time performance)

Design CG for prototyping and fabrication Requires precision modeling and engineering visualization

Scientific and Medical Visualization, Operation Requires handling large datasets May need device integration Real-time interactive modeling & visualization

GUIs, AR/VR, scanners Interaction with software & hardware, I/O of 3D data Emphasis on usability

Computer Graphics: Basic Questions Form (modeling) How do we represent (2D or 3D) objects & environments? How do we build these representations? Function, Behavior (animation) How do we represent the way objects move? How do we define & control their motion? Appearance (rendering) How do we represent the appearance of objects? How do we simulate the image-forming process?

What is an Image? Image = distribution of light energy on 2D film Digital images represented as rectangular arrays of pixels

Form & Appearance in CG illumination camera shape/surface geometry & reflectance pixel array

The Graphics Pipeline Modeling Animation Rendering Geometry: points, curves, & surfaces Scene Objects: parts, relations, & pose Texture and reflectance (e.g., color, diffusivity, opacity, refractions) Key-frame, motion capture, inverse kinematics, dynamics, behaviors, motion planning, Visibility Simulation of light (e.g., illuminants, emissive surfaces, scattering, transmission, diffraction, ) Special effects (e.g., antialiasing, motion blur, nonphotorealism)

Graphics Pipeline: Modeling How do we represent an object geometrically on a computer? How do we represent an object geometrically on a computer? Point clouds Polygon meshes Texture maps Smooth surface patches Parametric curves

Graphics Pipeline: Animation Physical simulation Key-Framing Behavior rules

Graphics Pipeline: Rendering Input: Scene description, lighting, camera Output: Image that the camera will observe accounting for visibility, clipping, projection,

Course Topics Principles Theoretical & practical foundations of CG (core mathematics, physics, modeling methods) CG programming (assignments & tutorials) Experience with OpenGL (industry-standard CG library) Creating CG scenes

What You Will Take Away #1: yes, math IS useful in CS!! #2: how to turn math & physics into pictures. #3: basics of image synthesis #4: how to code CG tools

Administrivia Grading: 50%: 3 assignments handed out in class (25% 15% 10%). 50%: 1 test in class (15%) + 1 final exam (35%). First assignment: on web in two weeks. Wooden Monkey assignment on web now! Check web for schedule, dates, more details & policy on late assignments. Tutorial sessions: Math refreshers, tutorials on OpenGL and other graphical libraries, additional topics. Attendance STRONGLY encouraged since I will not be lecturing on these topics in class. Lecture slides & course notes, already on web.

Topic 1. Basic Raster Operations: Line Drawing A simple line drawing algorithm Line anti-aliasing

2D Drawing Common geometric primitives: When drawing a picture, 2D geometric primitives are specified as if they are drawn on a continuous plane Drawing command: Draw a line from point (10,5) to point (80,60) y (80,60) (10,5) x

2D Drawing In reality, computer displays are arrays of pixels, not abstract mathematical continuous planes Continuous line (80,60) Digital line y y (10,5) x x In graphics, the conversion from continuous to discrete 2D primitives is called scan conversion or rasterization

Basic Raster Operations (for 2D lines) Scan conversion: Given a pair of pixels defining the line s endpoints & a color, paint all pixels that lie on the line. Clipping: If one or more endpoints is out of bounds, paint only the line segment that is within bounds. Region filling: Fill in all pixels within a given closed connected boundary of pixels.

Line Scan Conversion: Key Objectives Accuracy: pixels should approximate line closely. Speed: line drawing should be efficient Digital line Visual Quality: No discernable artifacts.

Equation of a Line Line between (x0,y0) and (x1,y1) dx= x1 x0,dy=y1 y0 Explicit : y = mx + b m=dy/dx, b=y0 -mx0 Parametric : x(t) = x0 + dx*t y(t) = y0 + dy*t P = P0 + (P1-P0)*t P = P0*(1-t) + P1*t (weighted sum) Implicit : (x-x0)dy - (y-y0)dx = 0

Algorithm I DDA (Digital Differential Analyzer) Explicit form: y= dy/dx * (x-x0) + y0 float y; int x; dx = x1-x0; dy = y1 y0; m = dy/dx; y= y0; for ( x=x0; x<=x1; x++) { setpixel (x, round(y)); y= y + m; }

Algorithm I (gaps when m>1) DDA (Digital Differential Analyzer) Explicit form: y= dy/dx * (x-x0) + y0 float y; int x; dx = x1-x0; dy = y1 y0; m = dy/dx; y= y0; for ( x=x0; x<=x1; x++) { setpixel (x, round(y)); y= y + m; }

Aliasing Raster line drawing can produce a jaggy appearance. Jaggy Jaggies are an instance of a phenomenon called aliasing. Removal of these artifacts is called anti-aliasing.

Anti-Aliasing How can we make a digital line appear less jaggy? Aliased line Anti-aliased line Intensity proportional to pixel area covered by thick line Main idea: Rather than just drawing in 0 s and 1 s, use inbetween values in neighborhood of the mathematical line.

Anti-Aliasing: Example Aliased line Anti-aliased line

Topic 2. 2D Curve Representations Explicit representation Parametric representation Implicit representation Tangent & normal vectors

Explicit Curve Representations: Definition Curve represented by a function f such that: y=f(x) line: y=mx+b f(x) x

Explicit Curve Representations: Limitations Curve represented by a function f such that: y=f(x) f(x) x

Parametric Curve Representation: Definition Curve represented by two functions f x, f y And an interval [a,b] such that: (x,y)=( f x (t), f y (t) ) are points on the curve for t in [a,b] ( f x (t), f y (t) ) A curve is closed when??

Parametric Representation of a Line Segment pt) = p0 + (p1 p0)*t, 0 t 1 0 t : ray from p0 through p1 p1 - t : line through p0 and p1 p0 In general if p(t) = a0 + a1*t, how do you solve for a0, a1?

Line Segment as interpolation p(t) = a0 + a1*t p1 p3 p0 p2

Curve as interpolation (Catmull-Romm) p(t) = a0 + a1*t + a2*t 2 + a3*t 3 p1 p3 p0 p2

Polygons Polygon: A continuous piecewise linear closed curve. Simple polygon: non-self intersecting. Convex: all angle less than 180 degrees. Regular: simple, equilateral, equiangular. n-gon: pi = r(cos(2πi/n), sin(2πi/n)), 0 i <n pn p0 p2 p1

Representations of a Circle Parametric: p(t) = r(cos(2πt), sin(2πt)), 0 t 1 Implicit: r x 2 +y 2 -r 2 =0

Representations of an Ellipse Parametric: p(t) = (a*cos(2πt), b*sin(2πt)), 0 t 1 Implicit: x 2 /a 2 +y 2 /b 2-1=0 b a

Curve tangent and normal Parametric: p(t) = (x(t),y(t)). Tangent: (x (t),y (t)). Implicit: f(x,y) =0. Normal: gradient(f(x,y)). Tangent and normal are orthogonal.