Computer Graphics George Mason University Jim X. Chen, Ph.D.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

CP411 Computer Graphics, Wilfrid Laurier University Introduction # 1 Welcome to CP411 Computer Graphics 2012 Instructor: Dr. Hongbing Fan Introduction.
What is OpenGL? Low level 2D and 3D Graphics Library Competitor to Direct3D (the rendering part of DirectX) Used in: CAD, virtual reality, scientific.
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
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.
Computer Graphics Hardware and Software Lecture Notes, CEng 477.
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.
History of Computer Graphics Facts 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,
Computer Graphics/and Multimedia CMM472/CIT773 What is CG ?, History of CG, Course Overview.
2005 by Jim X. Chen: Jim X. Chen, Ph.D. Director of Computer Graphics Lab George Mason University.
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.
Grafica(1): Introduction Dott. Alessio Malizia
Computer Graphics/and Multimedia CMM472/CIT773 What is CG ?, History of CG, Course Overview.
Co mputer Graphics Researched via: Student Name: Nathalie Gresseau Date:12/O7/1O.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
A Survey of COMPUTER GRAPHICS
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
Computer Graphics Researched via: Student Name: Symone Haynes Date: April 29, 2010.
1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the.
Computer Graphics Researched via: Student Name: James Wood Date: 4/29/10.
Drawing Board. House Plan Electricity Installation.
Introduction to Processing. 2 What is processing? A simple programming environment that was created to make it easier to develop visually oriented applications.
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
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.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
NoufNaief.net TA: Nouf Al-harbi.
1 Computer Graphics Week1 -Introduction. Computer graphics History Computer graphics generally means creation, storage and manipulation of models and.
Computer Graphics and Multimedia Dr. Rajesh Siddavatam Ph.D (BITS–Pilani) Dean – Quality Assurance Professor Mail:
COMP413: Computer Graphics Overview of Graphics Systems Chapter 1.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Computer Graphics Lecture 2. Computer graphics application 1- Graphics and chart :- Early application for graphics display simple data graphic, but today.
Computer Graphics Lecture 1 Introduction to Computer Graphics
What is Computer Graphics?
TEXT BOOK : COMPUTER GRAPHICS DONALD HEARN & M.PAULINE BAKER
In the name of God Computer Graphics.
Programming with OpenGL Part 1: Background
Chapter 1 An overview on Computer Graphics
Graphics Systems and Models
Graphics Programming CSC
Computer Graphics Researched via:
Computer Graphics - Introduction -
Computer Graphics.
MCA 503 COMPUTER GRAPHICS TEXT BOOK :
Chapter 1 An overview on Computer Graphics
What is Computer Graphics?
What is Computer Graphics?
Set up OpenGL Programming Environment
Computer Graphics Introduction.
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics
Programming with OpenGL Part 1: Background
AN INTRODUCTION TO COMPUTER GRAPHICS Subject: Computer Graphics Lecture No: 01 Batch: 16BS(Information Technology)
What is Computer Graphics?
Programming with OpenGL Part 1: Background
Chapter 2 Overview of Graphics Systems
COMPUTER GRAPHICS with OpenGL (3rd Edition) Donald Hearn M
Presentation transcript:

Computer Graphics George Mason University Jim X. Chen, Ph.D. Director of Computer Graphics Lab George Mason University @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Reference V. Scott Gordon and John L. Clevenger, Computer Graphics Programming in OpenGL with Java, January 2017. Jim. X Chen and Chunyang Chen, Foundations of 3D Graphics Programming, Springer Verlag, Second Edition. OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.x, 8th or 9th Edition OpenGL Superbible: Comprehensive Tutorial and Reference (7th Edition) @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Objects and Models 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 3 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Computer Graphics Points Lights Raytracing nfaces CG displays or animates real or imaginary objects from their computer-based models; Modeling creating and modifying a model image processing treats the inverse process: the analysis of images, pattern recognition, or the reconstruction of 2D or 3D objects from images. @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu 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. 5 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Object, Model, and Image tank 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. 6 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Interactive User controls the creation, modification, and animation of the models through input devices (keyboard & mouse) spider 7 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Primitive Lab Primitive and Graphics Library 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 triangles) OpenGL is a graphics library; DirectX includes a graphics library Direct3D @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu OPENGL DRAWING PRIMITIVES glBegin(GL_POLYGON); glVertex2f(0.0, 0.0); glVertex2f(0.0, 3.0); glVertex2f(3.0, 3.0); glVertex2f(4.0, 1.5); glVertex2f(3.0, 0.0); glEnd(); Primitive Lab gl.glDrawArrays(GL_POINTS, 0, 3); //void glDrawArrays(int mode, int first, int count) @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu OpenGL Programming OpenGL is the most widely used graphics library (GL) or application programming interface (API ) Example: JOGL1_0_Frame.java To change the font size in Eclipes: Window->Preferences… General->Colors and Fonts->Basic->Text Font, then select. links to all the example programs, and setting up working environments on different platforms: http://www.cs.gmu.edu/~jchen/graphics/ @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Double Buffers By default, we have two framebuffers, the front buffer and the back buffer. You can specify to draw into both front and back buffers if you are not generating an animation gl.glDrawBuffer(GL.GL_FRONT_AND_BACK); @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu APPLICATIONS Graphical User Interface (GUI): desktop window systems (menu items, icons, objects) 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 Cartography and information visualization 12 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu BRIEF HISTORY 1963 Evan Sutherland’s seminal doctoral work “Sketchpad: a man-machine graphical communication system” 1977 3D 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, PHIGS (ANSI and ISO standard); SGI’s GL; 1993 OpenGL (Open standard from SGI) Since then, OpenGL supported on PC, MAC, Sun work-stations, SGI work-stations, special purpose image generators 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 13 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Graphics System: Framebuffer, San-conversion Keyboard Application OpenGL program Computer and Mouse GLUT Graphics hardware and Graphics Frame Video Display C functions buffer controller models 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) 14 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu 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 15 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu The screen is a window for the user to manipulate not only the image, but also the model A picture is produced as an array (raster) of picture elements (pixels) saved in the framebuffer The framebuffer corresponds to the CRT picture. 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). 16 @ 2017 by Jim X. Chen: jchen@gmu.edu

@ 2017 by Jim X. Chen: jchen@gmu.edu Complex Object and Animation 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 triangle (polygon), a curve, a surface, … 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. 17 @ 2017 by Jim X. Chen: jchen@gmu.edu

HW0: due before next class Set up your programming environment, and run the sample programs. If you failed, meet the TA or come to my office during my office hours or bring your computer to the next class. I won’t be happy to receive questions about the working environment after this week. 18 @ 2017 by Jim X. Chen: jchen@gmu.edu