Computer Graphics and Multimedia Dr. Rajesh Siddavatam Ph.D (BITS–Pilani) Dean – Quality Assurance Professor Mail:

Slides:



Advertisements
Similar presentations
Chapter 2: Graphics Programming
Advertisements

Graphics Pipeline.
CP411 Computer Graphics, Wilfrid Laurier University Introduction # 1 Welcome to CP411 Computer Graphics 2012 Instructor: Dr. Hongbing Fan Introduction.
ICS 415Dr. Muhammed Al-Mulhem1 ICS 415 Computer Graphics Introduction Dr. Muhammed Al-Mulhem March 1, 2009 Dr. Muhammed Al-Mulhem March 1, 2009.
What is OpenGL? Low level 2D and 3D Graphics Library Competitor to Direct3D (the rendering part of DirectX) Used in: CAD, virtual reality, scientific.
Graphics-1 Gentle Introduction to Computer Graphics Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia.
Graphics-1 Gentle Introduction to Computer Graphics (1) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 1: Background Ed Angel Professor of Computer Science, Electrical.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 What is Computer Graphics? Ed Angel Professor of Computer Science, Electrical and Computer.
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphicsIntroduction Dr. Eng. Farag Elnagahy
Programming with OpenGL Part 1: Background Mohan Sridharan Based on slides created by Edward Angel CS4395: Computer Graphics 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
History of Computer Graphics Ideas taken from Computer Graphics Comes of Age an Interview with Andres Van Dam published in ACM Communications in July 1984.
Overview of Computer Graphics Chapter 1. Bird’s Eye View  Overview of Computer Graphics –Basic concept of computer graphics, system, programming platforms,
2005 by Jim X. Chen: The OpenGL graphics system is an application Programming interface (API) to graphics hardware. WHAT.
Advanced Computer Graphics Spring-2011 Kocaeli University Computer Engineering Department.
Introduction to Computer Graphics (CS560/CS460) Computer graphics means the art and science of creating images of three dimensional objects. Huge and Fast-moving.
2005 by Jim X. Chen: Jim X. Chen, Ph.D. Director of Computer Graphics Lab George Mason University.
Using Graphics Libraries Lecture 3 Mon, Sep 1, 2003.
Dr. Sana’a Wafa Al-Sayegh
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 What is Computer Graphics? Sai-Keung Wong ( 黃世強 ) Computer Science National.
Graphics Graphics Korea University cgvr.korea.ac.kr Introduction to Computer Graphics.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics Computer Graphics is everywhere: Visual system is most important sense: High bandwidth Natural communication Fast developments in Hardware.
A Survey of COMPUTER GRAPHICS
Using OpenGL in Visual C++ Opengl32.dll and glu32.dll should be in the system folder Opengl32.dll and glu32.dll should be in the system folder Opengl32.lib.
Graphics Architectures & OpenGL API Introduction Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
UNIT I 2D PRIMITIVES INTRODUCTION 1 SNSCE/IT/ARUNA.
Programming with OpenGL Part 1: Background
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
COMPUTER GRAPHICS Hochiminh city University of Technology Faculty of Computer Science and Engineering CHAPTER 01: Graphics System.
Computer Graphics I, Fall : What is Computer Graphics?
Institute for Visualization and Perception Research 1 © Copyright 2000 Haim Levkowitz Introduction (Foley & Van Dam Ch 1) Uses of computer graphics … Some.
Ch 2 Graphics Programming page 1 CSC 367 Coordinate Systems (2.1.2) Device coordinates, or screen coordinates (pixels) put limitations on programmers and.
CD2012 Principles of Interactive Graphics Lecture 01 Introduction Abir Hussain (Rome: 6.33,Tel , Web:
CSE 581: Interactive Computer Graphics Spring 2012, UG 4 Tuesday, Thursday – 9:00AM – 10:18AM DL 0317 Raghu Machiraju Slides: Courtesy - Prof. Huamin Wang,
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
MAE 152 Computer Graphics for Scientists and Engineers Fall 2003 Dr. Prashant V. Mahajan Senior Research Scientist AValonRF, Inc., El Cajon, CA.
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 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Introduction to OpenGL and GLUT. What’s OpenGL? An Application Programming Interface (API) A low-level graphics programming API – Contains over 250 functions.
What is Computer Graphics?. 2 Objectives In this lecture, we explore what computer graphics is about We will give a historical introduction.
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 What is Computer Graphics? Sai-Keung Wong ( 黃世強 ) Computer Science National.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 What is Computer Graphics?
Introducing: Computer Graphics Chapter 1. Chpater 1 -- Introducing: Computer Graphics2 n Computer Graphics is a branch of Computer Science, but its appeal.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
In the name of God Computer Graphics.
Chun-Yuan Lin Introduction to OpenGL 2015/12/19 1 CG.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
NoufNaief.net TA: Nouf Al-harbi.
Introduction to Graphics Programming. Graphics API.
Graphics Graphics Korea University kucg.korea.ac.kr Graphics Programming 고려대학교 컴퓨터 그래픽스 연구실.
Instructor: Dr. Shereen Aly Taie 1.  Broad introduction to Computer Graphics ◦ Software ◦ Hardware ◦ Applications  CAD برامج التصميم 2.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Computer Graphics Lecture 1 Introduction to Computer Graphics
In the name of God Computer Graphics.
What is Computer Graphics?
Computer Graphics George Mason University Jim X. Chen, Ph.D.
Computer Graphics Introduction.
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics
Introduction to OpenGL
What is Computer Graphics?
Presentation transcript:

Computer Graphics and Multimedia Dr. Rajesh Siddavatam Ph.D (BITS–Pilani) Dean – Quality Assurance Professor Mail:

Overview Introduction, Context and applications Graphics Pipeline and hardware Raster Graphics : Design, analysis and implementation of data structures and algorithms Algorithms for clipping 2D geometric transformations

Overview Area filling Viewing 3D object representations (Bezier curves and Surfaces) Geometric and modeling transformations 3D viewing Visible surface detection methods Illumination models and surface rendering methods

Why Study Computer Graphics? Graphics is cool I like to see what I’m doing I like to show people what I’m doing Graphics is interesting Involves simulation, algorithms, architecture… I’ll may/maynot get an Oscar for my acting But maybe I’ll get one for my CG special effects Graphics is fun

Brief History - CG 1963 Evan Sutherland’s seminal doctoral work at MIT “Sketchpad: a man-machine graphical communication system” D Core Graphics System by ACM SIGGRAPH Committee 1980’s, hardware expensive & graphics app. programs were few 1985 GKS (the Graphical Kernel System), 2D 1987 MIT’s X lib for windows under UNIX OS 1988 GKS-3D; SGI’s GL 1992 OpenGL (Open standard from SGI) Since then, OpenGL supported on PC, MAC, Sun work-stations, SGI work-stations, special purpose image generators (ESIG) Since then, Evolution of advanced GUI’s and graphics environments; Software from low-level, device dependent packages to higher-level device-independent packages 2003 JOGL – Java for OpenGL from Sunmicrosystem

Applications – CG Science & Engineering: visualization, modeling, simulation Medicine: medical imaging, surgery planning Art, Commerce, Entertainment: galleries, games, ads, film (Jurassic Park, Star Trek) Computer-aided design (CAD): buildings, auto bodies, airplane wings, VLSI chips, etc. Office automation and electronic publishing Information visualization

Objectives Introduce basic graphics concepts object, model, image, graphics library, frame buffer, scan-conversion, clipping, and anti-aliasing Set up OpenGL programming environment Understand simple OpenGL programs

Definition of Computer Graphics (CG) CG displays or animates real or imaginary objects from their computer- based models; Modeling defined as creating and modifying a model Graphics can be interactive User controls the creation, modification, and animation of the models through input devices (keyboard & mouse)

A real or imaginary object is represented in a computer as a model, and is displayed as an image. A model is an abstract description of the object’s shape (vertices) and attributes (colors), which can be used to find all the points on the object corresponding to the pixels in the drawing area. Given a model, the application program will control the pen through a graphics library to generate the corresponding image. An image is simply a 2D array of pixels. Object, Model and Image

CG-Display A graphics display is a drawing area comprised of an array of fine points called pixels (picture elements). At the heart of a graphics system there is a magic pen, move at lightning speed to a specific pixel draw the pixel with a specific color — a red, green, and blue (RGB) vector value. Computer graphics is about using this pen automatically through programming.

The Basics Main tasks: modeling: creating and representing the geometry of objects in the 3D world rendering: generating 2D images of the objects animation: describing how objects change in time

Primitives and OpenGL A graphics library provides a set of graphics commands or functions. bound in C, Java, or other programming languages on different platforms. specify primitive 2D and 3D geometric models to be digitized and displayed. Primitive models or simply primitives stand for some simple shapes (such as points, lines, and polygons) OpenGL is a graphics library

Clipping – CG Any procedure which identifies that portion of a picture which is either inside or outside a picture is referred to as a clipping algorithm or clipping.

Open GL ( OpenGL is the most widely used graphics library (GL) or application programming interface (API ) Developed by Silicon Graphics – 1992 More Need to use OpenGL for Lab

Graphics System: Framebuffer, Scan-conversion The graphics system generates the image specified by the application program in the framebuffer and displays the picture on the display The application program accepts user input and controls the graphics model (create, store, retrieve, modify, and send it to the graphics system) The digitization process is called scan-conversion (drawing, rendering) Frame buffer Video controller Display Keyboard Mouse Graphics hardware Computer and OpenGL GLUT and C functions Application program Graphics models

Mouse, keyboard for input, CRT (cathode ray tube) for output (Other input/output devices) Most of the programmer’s task concerns creating and changing the model and handling user interaction Models typically store descriptions of the shapes, positions, attributes (color), and hierachical relationships of the components A graphics library includes output subroutines of primitives and attributes, such as in OpenGL glRecti(x1,y1,x2,y2), glColor3f(r,g,b), etc. glBegin(GL_POINTS); glVertex2i (x,y); glEnd();

The screen is a window for the user to manipulate not only the image, but also the model An event is a user input or other state change queued with other events generated in timely order Each event is handled in the queued order by the system or user event handler (user program). A picture is produced as an array (raster) of picture elements (pixels) saved in the framebuffer The framebuffer corresponds to the CRT picture.

To draw a complex shape, we need an application program to dissect it into pieces of simple shapes (primitives), or construct it from primitives. We have the magic pen that draws a pixel. If we can draw a pixel, we can draw a point, a line, a polygon, a curve, a surface, Solid we can draw a complex object, clear the drawing area, draw the object at a slightly different location, and repeat the above processes — the object is animated. Complex Object and Animation

/* Example 1point.c: draw randomly generated points */ #include #define Height 400 #define Width 400 How to draw a Point using Open GL

void display(void) { int x, y; //a. generate a random point x = rand() % Width; y = rand() % Height; //b. specify a drawing color: red glColor3f(1, 0, 0); //c. specify to draw a point glBegin(GL_POINTS); glVertex2i (x,y); glEnd(); //d. start drawing glFlush(); }

static void reshape(int w, int h) {//e. specify the window’s coordinates glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho(0, Width, 0, Height, -1.0, 1.0); } int main(int argc, char **argv) {//f. initialize a drawing area glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE); glutInitWindowSize(Width, Height); glutCreateWindow("Example 1.1.point.c"); //g. specify event callback functions glutReshapeFunc(reshape); glutDisplayFunc(display); glutIdleFunc(display); glutMainLoop(); }

CG Lab Exercise Set up your programming environment, and run the first sample program that draws a point (or randomly generated points).

Graphics Applications Entertainment: Cinema Pixar: Monster’s Inc. Square: Final Fantasy

Graphics Applications Entertainment: Games GT Racer 3 Polyphony Digital: Gran Turismo 3, A Spec

Graphics Applications Video Games

Graphics Applications Medical Visualization MIT: Image-Guided Surgery Project The Visible Human Project

Graphics Applications Computer Aided Design (CAD)

Graphics Applications Scientific Visualization