CSC 8470 Computer Graphics. What is Computer Graphics?

Similar documents
CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

Assignment 1. Simple Graphics program using OpenGL

Programming using OpenGL: A first Introduction

Graphics Programming

Programming of Graphics

OpenGL. Toolkits.

Programming with OpenGL Part 2: Complete Programs Computer Graphics I, Fall

Luiz Fernando Martha André Pereira

Computer Graphics. Making Pictures. Computer Graphics CSC470 1

Computer Graphics (CS 4731) OpenGL/GLUT(Part 1)

2D Drawing Primitives

Computer Graphics. OpenGL

ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO EECS 104. Fundamentals of Computer Graphics. OpenGL

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

Computer graphic -- Programming with OpenGL I

Introduction to Computer Graphics with OpenGL/GLUT

CS130 : Computer Graphics. Tamar Shinar Computer Science & Engineering UC Riverside

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

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

Teacher Assistant : Tamir Grossinger Reception hours: by - Building 37 / office -102 Assignments: 4 programing using

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 2: First Program

Rendering. Part 1 An introduction to OpenGL

CS Computer Graphics: OpenGL, Continued

CS Computer Graphics: OpenGL, Continued

Computer Graphics (Basic OpenGL)

CSE 167: Introduction to Computer Graphics Lecture #5: Visibility, OpenGL

RECITATION - 1. Ceng477 Fall

Introduction to OpenGL Week 1

Objectives. Image Formation Revisited. Physical Approaches. The Programmer s Interface. Practical Approach. Introduction to OpenGL Week 1

Drawing Primitives. OpenGL basics

Programming with OpenGL Part 1: Background

Graphics Pipeline & APIs

OpenGL/GLUT Intro. Week 1, Fri Jan 12

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Lecture 4 of 41. Lab 1a: OpenGL Basics

OpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University

Graphics Pipeline & APIs

CS 4204 Computer Graphics

Draw the basic Geometry Objects. Hanyang University

Basic Graphics Programming

CSE4030 Introduction to Computer Graphics

Graphics Programming. 1. The Sierpinski Gasket. Chapter 2. Introduction:

COMPUTER GRAPHICS LAB # 3

Computer Graphics. Anders Hast. måndag 25 mars 13

CS 4731 Lecture 3: Introduction to OpenGL and GLUT: Part II. Emmanuel Agu

COMP 371/4 Computer Graphics Week 1

Graphics Programming. August 31, Programming of the Sierpinski gasket. Programming with OpenGL and C/C++

Computer Graphics, Chapt 08

Geometry Primitives. Computer Science Department University of Malta. Sandro Spina Computer Graphics and Simulation Group. CGSG Geometry Primitives

Basic Graphics Programming

Computer Graphics and Visualization. Graphics Systems and Models

OPENGL AND GLSL. Computer Graphics

API for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3

11/1/13. Basic Graphics Programming. Teaching Assistant. What is OpenGL. Course Producer. Where is OpenGL used. Graphics library (API)

Precept 2 Aleksey Boyko February 18, 2011

Computer Graphics. Chapter 3 Computer Graphics Software

Exercise 1 Introduction to OpenGL

Lectures OpenGL Introduction

Computer Graphics 1 Computer Graphics 1

Computer Graphics Fundamentals. Jon Macey

CS451Real-time Rendering Pipeline

Computer graphics MN1

Building Models. Prof. George Wolberg Dept. of Computer Science City College of New York

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Introduction to Computer Graphics with WebGL

Announcements OpenGL. Computer Graphics. Autumn 2009 CS4815

Information Coding / Computer Graphics, ISY, LiTH. OpenGL! ! where it fits!! what it contains!! how you work with it 11(40)

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)

Lecture 3 Advanced Computer Graphics (CS & SE )

Graphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University

CS450/550. Pipeline Architecture. Adapted From: Angel and Shreiner: Interactive Computer Graphics6E Addison-Wesley 2012

Models and Architectures

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1

Graphics Hardware and Display Devices

CIS 581 Interactive Computer Graphics

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics and Visualization. What is computer graphics?

Lecture 2 CISC440/640 Spring Department of Computer and Information Science

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

CSE 167: Introduction to Computer Graphics Lecture #5: Illumination Model

Announcement. Homework 1 has been posted in dropbox and course website. Due: 1:15 pm, Monday, September 12

Announcements OpenGL. Computer Graphics. Spring CS4815

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

Rendering Pipeline/ OpenGL

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

CS Computer Graphics: Hidden Surface Removal

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

Rendering Objects. Need to transform all geometry then

INTRODUCTION. Slides modified from Angel book 6e

CS418 OpenGL & GLUT Programming Tutorial (I) Presented by : Wei-Wen Feng 1/30/2008

GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW

Graphics Processing Unit Architecture (GPU Arch)

3D graphics, raster and colors CS312 Fall 2010

This library uses only GL functions but contains code for creating common objects and simplifying viewing.

OpenGL refresher. Advanced Computer Graphics 2012

API Background. Prof. George Wolberg Dept. of Computer Science City College of New York

Programming with OpenGL Part 1: Background

Transcription:

CSC 8470 Computer Graphics What is Computer Graphics? For us, it is primarily the study of how pictures can be generated using a computer. But it also includes: software tools used to make pictures hardware for efficient graphics processing input devices for interacting with these pictures output devices for displaying the pictures

Graphics Application: Information Visualization GOAL: Visualization of complex multidimensional data for analysis and presentation. Examples: Clinical trial data Business consultancy data Graphics application: Direct Volume Rendering GOAL: Visualization of highly complex data Texture adds a high visual dimension

Graphics Application: Biomedical Visualization GOAL: Improve the perception, analysis, understanding of interactions between complex data Graphics Application:Virtual Reality GOAL: Design effective simulation and education applications by combining real and virtual elements Reduce cost & improve safety of applications

Graphics Application: Computer Aided Design GOAL: Develop novel interfaces for the efficient design of products, scenes and characters. In general focus is on real-time performance and rapid prototyping, and/or visual realism. Graphics Application: Advertisements

Graphics Application: Arts and Publishing Graphics Application: Everyday Use

Course Goals Learn the Process of Creating an Image

Learn Animation Basics Animation Example

Data Crunching behind Avatar Tools we Will Use www.opengl.org www.blender.org www.povray.org

Main Topics Basic Graphics Concepts Graphics System and Architecture Algorithms for simple graphics Geometric Objects and Transformations Viewing and Projection Shading and Rendering Texture Mapping Lighting and Ray Tracing Recommended: Resources Online material References on the class website

Grading Assignments (60%) Pencil and paper Clean, readable, working code On time (no late submission) First assignment is available now Exam (30%) Class Participation (10%) No makeup assignments or exams Lecture attendance is mandatory Any questions before we start?

Graphics Systems Basics What is a digital image? Pixel: Raster image:

Pixel Depth Pixel depth: Effect of Pixel Depth bits bits bits Banding:

Effect of Pixel Depth 2 bits (4 colors) 4 bits (16 colors) Source: Wikipedia, http://en.wikipedia.org/wiki/pixel_depth Raster Displays Path of electron beam Display surface: Dotted with material that emits light when stimulated by electron beam. Beam must repeatedly stimulate dots row by row, b/c intensity fades when not stimulated. Refresh rate: Resolution:

Light White light: Raster Displays Revisited

LCD: LCD displays Additive Color Model: Color Models Subtractive Color Model:

Color Raster Images Pixel color is encoded as ordered triple. Color value (R,G,B) Displayed (0, 0, 0) Black (0, 0, 1) Blue (0, 1, 0) Green (1, 0, 0) Red (1, 0, 1) Magenta (1, 1, 0) Yellow (0, 1, 1) Cyan (1, 1, 1) White Frame Buffer Special memory where pixel colors are stored. System Bus CPU Main Memory Graphics Card -- Graphics Processing Unit (GPU) -- Frame Buffer

Modeling-Rendering Paradigm Modeling Rendering The Concept of Pipeline b c a * +

Graphics Pipeline 3D Vertices Raster Image Vertex Processor Clipper Rasterizer Fragment Processor ALL done by the GPU on the graphics card! Hands-On Session

A cross-platform Application Programming Interface (API) for producing 2D and 3D computer graphics Developed by Silicon Graphics Inc. (1992) See: http://www.opengl.org OpenGL Graphics Programming OpenGL Industry standard API for 3D graphics Cross-platform Windows, MAC, Unix Supported on all hardware platforms OpenGL API (gl) core of OpenGL API OpenGL Utility API (glu) additional functionality built on top of GL OpenGL Utility Toolkit (glut) Handles the windowing system, menus, events, etc.

Hands-on Activities In the future you will write your own OpenGL program, but this time you ll copy an existing program (squares.cpp) from the course website. Get the activities handout from your instructor. OpenGL Introduction OpenGL Geometric Primitives OpenGL Attributes Sierpinski s Triangle

Points, Lines, Polygons Vertices A vertex is a location in the plane Specified by its x and y coordinates Used to define geometric primitives The simplest geometric primitive is a point General form: glvertex* Examples: glvertex2i(int x, int y); glvertex3f(float x, float y, float z); glvertex3fv(float vcoord);

glvertex* glbegin( GL_POINTS ); glvertex2i(100, 100); glvertex2i(400, 100); glvertex2i(250, 400); glend(); OpenGL Primitives 500 y x 500 glbegin( GL_LINE_LOOP ); glvertex2i(100, 100); glvertex2i(400, 100); glvertex2i(250, 400); glend(); 500 y x 500

Many Questions How to interpret the values of x, y? In what units are they? Feet, meters or pixels? Where is the origin? Where on the screen does our image appear? How large will the image be? In what color are we drawing? Screen (Graphics) vs. Viewing (Clipping) Window glutinitwindowsize(600, 500); glutinitposition(200, 150); x screen win glortho2d(0, 600, 0, 500); y y viewing window x

OpenGL Attributes Examples: glcolor3f( 1.0, 0.0, 0.0 ); glclearcolor( 1.0, 1.0, 1.0, 1.0 ); glpointsize( 4.0 ); gllinewidth( 2.0 ); Once an attribute is set, it stays that value until you later change it. Hands-On Session The primitives.cpp Program Compile, Run & Play, eg: Change point size to 8 Change `GL_POINTS to: GL_LINES GL_LINE_STRIP GL_LINE_LOOP GL_POLYGON GL_QUADS GL_TRIANGLES GL_QUAD_STRIP GL_TRIANGLE_STRIP GL_TRIANGLE_FAN

The Sierpinski Gasket Algorithm: Start with 3 corner vertices v1, v2, v3 and one interior point p Repeat the following Hands-on Session The gasket.cpp Program Compile, Run & Play Change GL_POINTS to GL_LINES Comment out certain lines, e.g. glclear(gl_color_buffer_bit); (and resize your window) What happens when you resize your window?

Sierpinski Gasket -- Triangle Bisection Algorithm: Start with 3 corner vertices v1, v2, v3 Repeat the following Hands-on Session Save a copy of your gasket.cpp code Alter the code for the gasket to generate the Sierpinski gasket using triangle bisection