Lecture 3 Advanced Computer Graphics (CS & SE )

Size: px
Start display at page:

Download "Lecture 3 Advanced Computer Graphics (CS & SE )"

Transcription

1 Lecture 3 Advanced Computer Graphics (CS & SE )

2 Programming with OpenGL Program Structure Primitives Attributes and States Programming in three dimensions Inputs and Interaction Working with Callbacks

3 Program Structure Most OpenGL programs have a similar structure that consists of the following functions main(): defines the callback functions opens one or more windows with the required properties enters event loop (last executable statement) init(): : sets the state variables Viewing Attributes callbacks Display function Input and window functions

4 Basic Glut Program GLUT initialisation glutinit(& (&argc, argv); glutinitdisplaymode (GLUT_DOUBLE GLUT_RGB); Window initialisation glutinitwindowsize (500, 500); glutinitwindowposition (100, 100); glutcreatewindow (argv[0]); User defined initialisation init (); Declare callback functions glutdisplayfunc(display); glutreshapefunc(reshape); glutkeyboardfunc(keyboard); Begin Glut event loop glutmainloop();

5 Event Loop The main function ends with the program entering an event loop At this point program is triggered by events Event types: Window: resize, expose, iconify Mouse: click one or more buttons Motion: move mouse Keyboard: press or release a key Idle: nonevent - Define what should be done if no other event is in queue

6 Event Mode Most systems have more than one input device, each of which can be triggered at an arbitrary time by a user Each trigger generates an event whose measure is put in an event queue which can be examined by the user program Trigger Measure Event Process Process Queue Trigger Measure Await Event Program

7 GLUT Event Loop Remember that the last line in main.c for a program using GLUT must be glutmainloop(); puts the program in an infinite event loop In each pass through the event loop, GLUT Looks at the events in the queue For each event in the queue, GLUT executes the appropriate callback function if one is defined If no callback is defined for the event, the event is ignored

8 Callbacks Programming interface for event-driven input Define a callback function for each type of event the graphics system recognizes This user-supplied supplied function is executed when the event occurs

9 GLUT Callbacks GLUT recognizes a subset of the events recognized by any particular window system (Windows, X, Macintosh) glutdisplayfunc glutmousefunc glutreshapefunc glutkeyboardfunc glutidlefunc glutmotionfunc glutpassivemotionfunc

10 The Display Callback The display callback is executed whenever GLUT determines that the window should be refreshed, for example When the window is first opened When the window is reshaped When a window is exposed When the user program decides it wants to change the display In main.c glutdisplayfunc(mydisplay) identifies the function to be executed Every GLUT program must have a display callback

11 Using the Idle Callback The idle callback is executed whenever there are no events in the event queue glutidlefunc(myidle) Useful for animations void myidle() { /* change something */ t += dt glutpostredisplay(); } void mydisplay() { glclear(); /* draw something that depends on t */ glutswapbuffers(); }

12 The Mouse Callback glutmousefunc(mymouse) void mymouse(glint button, GLint state, GLint x, GLint y) Returns Which button (GLUT_LEFT_BUTTON( GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON, GLUT_RIGHT_BUTTON) ) caused event -State of that button (GL_UP( GL_UP, GLUT_DOWN) Position in window

13 Drawing Squares at Cursor Location void mymouse(int btn, int state, int x, int y) { if (btn( btn==glut_right_button && state==glut_down) exit(0); if (btn( btn==glut_left_button && state==glut_down) drawsquare(x,, y); } void drawsquare(int x, int y) { y=w-y; ; /* invert y position */ glcolor3ub( (char) rand()%256, (char) rand )%256, (char) rand()%256); glbegin(gl_polygon); glvertex2f(x+size, y+size); glvertex2f(x-size, y+size); glvertex2f(x-size, y-size); y glvertex2f(x+size, y-size); y glend(); }

14 Using the Motion Callback Can draw squares (or anything else) continuously as long as a mouse button is depressed by using the motion callback glutmotionfunc(drawsquare) Can draw squares without depressing a button using the passive motion callback glutpassivemotionfunc(drawsquare)

15 The Reshape Callback glutreshapefunc(myreshape) void myreshape( int w, int h) Returns width and height of new window (in pixels) A redisplay is posted automatically at end of execution of the callback GLUT has a default reshape callback but you probably want to define your own The reshape callback is good place to put camera functions because it is invoked when the window is first opened

16 Example Reshape This reshape preserves shapes by making the viewport and world window have the same aspect ratio } void myreshape(int w, int h) { glviewport(0, 0, w, h); glmatrixmode(gl_projection); /* switch matrix mode */ glloadidentity(); if (w <= h) gluortho2d(-2.0, 2.0, 2.0, -2.0 * (GLfloat( GLfloat) ) h / (GLfloat( GLfloat) ) w, 2.0 * (GLfloat( GLfloat) ) h / (GLfloat( GLfloat) ) w); else gluortho2d( * (GLfloat( GLfloat) ) w / (GLfloat( GLfloat) ) h, 2.0 * (GLfloat)) w / (GLfloat( GLfloat) ) h, -2.0, 2.0); glmatrixmode(gl_modelview); /* return to modelview mode */

17 Using Globals The form of all GLUT callbacks is fixed void mydisplay() void mymouse(glint button, GLint state, GLint x, GLint y) Must use globals to pass information to callbacks float t; /*global */ void mydisplay() { /* draw something that depends on t /* draw something that depends on t }

18 Posting Redisplays Many events may invoke the display callback function Can lead to multiple executions of the display callback on a single pass through the event loop We can avoid this problem by instead using glutpostredisplay(); sets a flag. GLUT checks to see if the flag is set at the end of the event loop If set then the display callback function is executed

19 OpenGL Primitives All rendering operations are composed of primitives. These need to be useful to the programmer and doable efficiently by the library & hardware. We will now look at those OpenGL primitives that are handled via the glbegin-glend glend mechanism. There are ten of these; they consist of ways to draw: Points. Polylines. Filled polygons. Other primitive rendering operations are handled differently in OpenGL. Specifically, those involving screen-aligned rectangles: pixmaps, bitmaps, and screen-aligned rectangular polygons. Recall: OpenGL has no circle/ellipse/curve primitives.

20 Ten Basic Primitives The ten glbegin-style OpenGL Primitives Points (1 primitive) GL_POINTS Polylines (3 primitives) GL_LINES GL_LINE_STRIP GL_LINE_LOOP Filled Polygons (6 primitives) Triangles GL_TRIANGLES GL_TRIANGLE_STRIP GL_TRIANGLE_FAN Quadrilaterals GL_QUADS GL_QUAD_STRIP General Polygons GL_POLYGON

21 Points A primitive is given a number of vertices (specified with glvertex ). Now we look at what the primitives do with the vertices they are given. Numbers indicate vertex ordering. Pink objects mark what is actually rendered. Points GL_POINTS

22 Polylines GL_LINES GL_LINE_STRIP GL_LINE_LOOP 5 4 2

23 Triangles GL_TRIANGLES Clockwise or counterclockwise 1 does not matter (yet). GL_TRIANGLE_STRIP GL_TRIANGLE_FAN 3 4 5

24 Quadrilaterals & General Polygons Polygons: Quadrilaterals GL_QUADS Clockwise or counterclockwise does not matter (yet) GL_QUAD_STRIP Note differences in vertex ordering! Polygons: General GL_POLYGON

25 Primitive Restrictions When drawing points, lines, and triangles, vertices can be in any positions you like. Individual quadrilaterals and general polygons must be: Planar (this is easy in 2-D). 2 Simple (no crossings, holes). Convex (bulging outward; no concavities). Know the ten primitives! Know the associated vertex orderings!

26 Polygon Issues OpenGL will only display polygons correctly that are Simple: edges cannot cross Convex: All points on line segment between two points in a polygon are also in the polygon Flat: all vertices are in the same plane User program must check if above true Triangles satisfy all conditions Nonsimple Nonconvex

27 Attributes Attributes are part of the OpenGL state and determine the appearance of objects Size and width (points, lines) Stipple pattern (lines, polygons) Polygon mode Display as filled: solid color or stipple pattern Display edges Color (points, lines, polygons)

28 Primitives and Attribute States As a geometric primitive is drawn, each of its vertices is affected by the current OpenGL attribute "state" variables. State variables refer to OpenGL capabilities that are Either "off" (set to the value GL_FALSE) or "on" (set to the value GL_TRUE). Or refer to a certain mode (set to a value of type GLenum) chosen from a fixed set of modes. Or are set to certain values (GLfloat( GLfloat, GLint,, etc...). Each state variable has a default value. The values of the state variables, whether set by default or by the programmer, remain in effect until changed.

29 "On" and "Off" State Variables State variables that refer to OpenGL capabilities can be either Enabled with the command glenable(glenum capability) Disabled With the command gldisable(glenum capability) Their current value can be queried using the command glisenabled(glenum capability) returns either GL_TRUE or GL_FALSE. Some OpenGL capabilities include: GL_POINT_SMOOTH If enabled, draw points with proper filtering, otherwise draw aliased a points. GL_LINE_SMOOTH If enabled, draw lines with correct filtering, otherwise, draw aliased a lines. GL_LINE_STIPPLE If enabled, use the current line stipple pattern when drawing lines. l

30 Mode State Variables Mode state variables require commands specific to the state variable being accessed in order to change its value. One example of this is the command to set the shading mode state variable, GL_SHADE_MODEL. A line or filled polygon primitive can be drawn with a single color (flat shading) or with many different colors (smooth shading) The desired shading technique can be specified with the command glshademodel(glenum mode) where mode GL_SMOOTH for smooth shading or GL_FLAT for flat shading, the default

31 Value State Variables Value state variables require commands specific to the state variable being accessed in order to change it value. At any point, the programmer can query the system for any variable's current value. Typically, one of the four following commands is used to do this depending upon the desired data type of the answer: glgetbooleanv() glgetdoublev() glgetfloatv() glgetintegerv()

32 Color RGB color Each color component is stored separately in the frame buffer Usually 8 bits per component in buffer glcolor3f the color values range from 0.0 (none) to 1.0 (all) glcolor3ub the values range from 0 to 255 Indexed Color Colors are indices into tables of RGB values Requires less memory indices usually 8 bits not as important now Memory inexpensive Need more colors for shading

33 Color and State The color as set by glcolor becomes part of the state and will be used until changed Colors and other attributes are not part of the object but are assigned when the object is rendered We can create conceptual vertex colors by code such as glcolor glvertex glcolor glvertex

34 Smooth Color Default is smooth shading OpenGL interpolates vertex colors across visible polygons Alternative is flat shading Color of first vertex determines fill color glshademodel (GL_SMOOTH) or GL_FLAT

35 Point Size and Line Width Point Size To control the size of a rendered point use the command glpointsize(glfloat size) size is the desired width in pixels for rendered points size must be greater than 0.0 and by default is 1.0 Line Width To control the width of lines use the commandgllinewidth(glfloat width) width is the desired width in pixels for rendered lines width must be greater than 0.0 and by default is 1.0

36 Stippled Lines To make stippled (dotted or dashed) lines, the stipple pattern must be defined using the command gllinestipple(glint factor, GLushort pattern) the pattern argument is a 16-bit series of 0s and 1s, and it's repeated as necessary to stipple a given line. 1 indicates that drawing occurs, and 0 that it does not, on a pixel by pixel basis. The pattern can be stretched out by using factor, which multiplies each sub-series series of consecutive 1s and 0s. factor is any value between 0 and 255, inclusive. The capability state variable GL_LINE_STIPPLE must be enabled by the call glenable(gl_line_stipple) ) for stippling to occur.

37 Three-dimensional Applications In OpenGL, two-dimensional applications are a special case of three-dimensional graphics Going to 3D Not much changes Use glvertex3*( ) Have to worry about the order in which polygons are drawn or use hidden-surface removal Polygons should be simple, convex, flat

38 Sierpinski Gasket The Sierpinski Gasket is named for the Polish mathematician who first proposed it. It is a fractal image that is made from equilateral triangles. Consider the filled area (black) and the perimeter (the length of all the lines around the filled triangles) As we continue subdividing area goes to zero perimeter goes to infinity Theoretically, the addition of the black triangles goes on forever. Does the black ever completely cover the white? This is not an ordinary geometric object It is neither two- nor three-dimensional It is a fractal (fractional dimension) object

39 Sierpinski Gasket (2D) Start with a triangle Connect bisectors of sides and remove central triangle Repeat

40 OpenGL Sierpinski Gasket (2D)

41 Moving to 3D We can easily make the program three dimensional by using typedef Glfloat point3[3] glvertex3f glortho But that would not be very interesting Instead, we can start with a tetrahedron

42 3D Gasket Start with a tetrahedon Subdivide each of the four faces Appears as if we remove a solid tetrahedron from the center leaving four smaller tetrahedtra

43 Problem Because the triangles are drawn in the order they are defined in the program, the front triangles are not always rendered in front of triangles behind them Does not account for hidden surfaces

44 Hidden-Surface Removal Want to see only those surfaces in front of other surfaces Only a problem in 3D OpenGL uses a hidden- surface method called the z-buffer algorithm saves depth information as objects are rendered so that only the front objects appear in the image

45 Using the z-buffer algorithm The algorithm uses an extra buffer, the z-buffer, z to store depth information as geometry travels down the pipeline It must be Requested in main.c glutinitdisplaymode (GLUT_SINGLE GLUT_RGB GLUT_DEPTH) Enabled in init.c glenable(gl_depth_test) Cleared in the display callback glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT) If the current rendered pixel is closer than the existing pixel then it replaces the existing pixel The pixel in the closer position to the viewer is the one that will w be displayed

46 Double Buffering Instead of one color buffer, we use two Front Buffer: : one that is displayed but not written to Back Buffer: : one that is written to but not displayed Program then requests a double buffer in main.c glutinitdisplaymode(gl_rgb GL_DOUBLE) At the end of the display callback buffers are swapped void mydisplay() { glclear() /* draw graphics here */ glutswapbuffers() }

47 Graphical Input Devices can be described either by Physical properties Mouse Keyboard Trackball Joystick Logical Properties What is returned to program via API A position An object identifier Modes How and when input is obtained Request or event

48 Incremental (Relative) Devices Devices such as the data tablet return a position directly to the operating system Devices such as the mouse, trackball, and joy stick return incremental inputs (or velocities) to the operating system Must integrate these inputs to obtain an absolute position Rotation of wheels in mouse Roll of trackball Difficult to obtain absolute position Can get variable sensitivity

49 Input Modes Input devices contain a trigger which can be used to send a signal to the operating system Button on mouse Pressing or releasing a key When triggered, input devices return information (their measure) ) to the system Mouse returns position information Keyboard returns ASCII code

50 References www/terry/opengl/changing_state.html files/talk1.pdf notes /lecture/pipeline.html Ed Angel Lecture notes (Lectures 4, 5, 6, 7, 8 and 9) Open GL web page

Project Sketchpad. Ivan Sutherland (MIT 1963) established the basic interactive paradigm that characterizes interactive computer graphics:

Project Sketchpad. Ivan Sutherland (MIT 1963) established the basic interactive paradigm that characterizes interactive computer graphics: Project Sketchpad Ivan Sutherland (MIT 1963) established the basic interactive paradigm that characterizes interactive computer graphics: User sees an object on the display User points to (picks) the object

More information

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

Programming with OpenGL Part 2: Complete Programs Computer Graphics I, Fall Programming with OpenGL Part 2: Complete Programs 91.427 Computer Graphics I, Fall 2008 1 1 Objectives Refine first program Alter default values Introduce standard program structure Simple viewing 2-D

More information

Lecture 4. Interaction / Graphical Devices. CS 354 Computer Graphics Sunday, January 20, 13

Lecture 4. Interaction / Graphical Devices. CS 354 Computer Graphics  Sunday, January 20, 13 Lecture 4 Interaction / Graphical Devices Graphical Input Devices can be described either by - Physical properties Mouse Keyboard Trackball - Logical Properties What is returned to program via API A position

More information

Introduction to Computer Graphics with OpenGL/GLUT

Introduction to Computer Graphics with OpenGL/GLUT Introduction to Computer Graphics with OpenGL/GLUT What is OpenGL? A software interface to graphics hardware Graphics rendering API (Low Level) High-quality color images composed of geometric and image

More information

Working with Callbacks

Working with Callbacks Working with Callbacks 1 Objectives Learn to build interactive programs using GLUT callbacks Mouse Keyboard Reshape Introduce menus in GLUT 2 The mouse callback glutmousefunc(mymouse) void mymouse(glint

More information

RECITATION - 1. Ceng477 Fall

RECITATION - 1. Ceng477 Fall RECITATION - 1 Ceng477 Fall 2007-2008 2/ 53 Agenda General rules for the course General info on the libraries GLUT OpenGL GLUI Details about GLUT Functions Probably we will not cover this part 3/ 53 General

More information

Programming with OpenGL Part 3: Three Dimensions

Programming with OpenGL Part 3: Three Dimensions Programming with OpenGL Part 3: Three Dimensions Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Objectives Develop a more sophisticated

More information

Input, Interaction and Animation Week 2

Input, Interaction and Animation Week 2 CS 432/637 INTERACTIVE COMPUTER GRAPHICS Input, Interaction and Animation Week 2 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New Mexico Objectives

More information

Programming using OpenGL: A first Introduction

Programming using OpenGL: A first Introduction Programming using OpenGL: A first Introduction CMPT 361 Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller 1 Today Overview GL, GLU, GLUT, and GLUI First example OpenGL functions and

More information

Programming with OpenGL Part 1: Background

Programming with OpenGL Part 1: Background Programming with OpenGL Part 1: Background Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Development of the OpenGL API

More information

CS Computer Graphics: OpenGL, Continued

CS Computer Graphics: OpenGL, Continued CS 543 - Computer Graphics: OpenGL, Continued by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Last time. OpenGL set up Basic structure OpenGL skeleton Callback functions, etc. R.W.

More information

CS Computer Graphics: OpenGL, Continued

CS Computer Graphics: OpenGL, Continued CS 543 - Computer Graphics: OpenGL, Continued by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Last time. OpenGL set up Basic structure OpenGL skeleton Callback functions, etc. R.W.

More information

Comp 410/510 Computer Graphics Spring Input & Interaction

Comp 410/510 Computer Graphics Spring Input & Interaction Comp 410/510 Computer Graphics Spring 2018 Input & Interaction Objectives Introduce the basic input devices - Physical Devices - Logical Devices Event-driven input Input Modes Programming event input with

More information

GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW

GL_COLOR_BUFFER_BIT, GL_PROJECTION, GL_MODELVIEW OpenGL Syntax Functions have prefix gl and initial capital letters for each word glclearcolor(), glenable(), glpushmatrix() glu for GLU functions glulookat(), gluperspective() constants begin with GL_,

More information

Lecture 11: Callbacks. CITS 3003 Graphics & Animation

Lecture 11: Callbacks. CITS 3003 Graphics & Animation Lecture 11: Callbacks CITS 3003 Graphics & Animation Slides: E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn to build interactive programs using GLUT callbacks

More information

CS559: Computer Graphics. Lecture 12: OpenGL Li Zhang Spring 2008

CS559: Computer Graphics. Lecture 12: OpenGL Li Zhang Spring 2008 CS559: Computer Graphics Lecture 12: OpenGL Li Zhang Spring 2008 Reading Redbook Ch 1 & 2 So far: 3D Geometry Pipeline Model Space (Object Space) Rotation Translation Resizing World Space M Rotation Translation

More information

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

ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO EECS 104. Fundamentals of Computer Graphics. OpenGL ERKELEY DAVIS IRVINE LOS ANGELES RIVERSIDE SAN DIEGO SAN FRANCISCO SANTA BARBARA SANTA CRUZ EECS 104 Fundamentals of Computer Graphics OpenGL Slides courtesy of Dave Shreine, Ed Angel and Vicki Shreiner

More information

Input and Interaction

Input and Interaction Input and Interaction Adapted from Edward Angel, UNM! Angel: Interactive Computer Graphics 3E Addison-Wesley 2002 Project Sketchpad Ivan Sutherland (MIT 1963) established the basic interactive paradigm

More information

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

Lecture 2 CISC440/640 Spring Department of Computer and Information Science Lecture 2 CISC440/640 Spring 2015 Department of Computer and Information Science Today s Topic The secrets of Glut-tony 2 So let s do some graphics! For the next week or so this is your world: -1 1-1 1

More information

Computer Graphics 1 Computer Graphics 1

Computer Graphics 1 Computer Graphics 1 Projects: an example Developed by Nate Robbins Shapes Tutorial What is OpenGL? Graphics rendering API high-quality color images composed of geometric and image primitives window system independent operating

More information

Computer Graphics. Making Pictures. Computer Graphics CSC470 1

Computer Graphics. Making Pictures. Computer Graphics CSC470 1 Computer Graphics Making Pictures Computer Graphics CSC470 1 Getting Started Making Pictures Graphics display: Entire screen (a); windows system (b); [both have usual screen coordinates, with y-axis y

More information

// double buffering and RGB glutinitdisplaymode(glut_double GLUT_RGBA); // your own initializations

// double buffering and RGB glutinitdisplaymode(glut_double GLUT_RGBA); // your own initializations #include int main(int argc, char** argv) { glutinit(&argc, argv); Typical OpenGL/GLUT Main Program // GLUT, GLU, and OpenGL defs // program arguments // initialize glut and gl // double buffering

More information

COMPUTER GRAPHICS LAB # 3

COMPUTER GRAPHICS LAB # 3 COMPUTER GRAPHICS LAB # 3 Chapter 2: COMPUTER GRAPHICS by F.S HILLs. Initial steps in drawing figures (polygon, rectangle etc) Objective: Basic understanding of simple code in OpenGL and initial steps

More information

Lecture 10: Input, Interaction & callbacks. CITS 3003 Graphics & Animation

Lecture 10: Input, Interaction & callbacks. CITS 3003 Graphics & Animation Lecture 10: Input, Interaction & callbacks CITS 3003 Graphics & Animation Slides: E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the basic input devices

More information

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

CS 4731 Lecture 3: Introduction to OpenGL and GLUT: Part II. Emmanuel Agu CS 4731 Lecture 3: Introduction to OpenGL and GLUT: Part II Emmanuel Agu Recall: OpenGL Skeleton void main(int argc, char** argv){ // First initialize toolkit, set display mode and create window glutinit(&argc,

More information

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

Input and Interaction. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Input and Interaction Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Introduce the basic input devices - Physical Devices

More information

Computer Graphics. OpenGL

Computer Graphics. OpenGL Computer Graphics OpenGL What is OpenGL? OpenGL (Open Graphics Library) is a library for computer graphics It consists of several procedures and functions that allow a programmer to specify the objects

More information

Introduction to OpenGL Week 1

Introduction to OpenGL Week 1 CS 432/680 INTERACTIVE COMPUTER GRAPHICS Introduction to OpenGL Week 1 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New Mexico Objectives

More information

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

Objectives. Image Formation Revisited. Physical Approaches. The Programmer s Interface. Practical Approach. Introduction to OpenGL Week 1 CS 432/680 INTERACTIVE COMPUTER GRAPHICS Introduction to OpenGL Week 1 David Breen Department of Computer Science Drexel University Objectives Learn the basic design of a graphics system Introduce graphics

More information

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

Teacher Assistant : Tamir Grossinger   Reception hours: by  - Building 37 / office -102 Assignments: 4 programing using Teacher Assistant : Tamir Grossinger email: tamirgr@gmail.com Reception hours: by email - Building 37 / office -102 Assignments: 4 programing using C++ 1 theoretical You can find everything you need in

More information

CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013

CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013 CMSC 425: Lecture 4 More about OpenGL and GLUT Tuesday, Feb 5, 2013 Reading: See any standard reference on OpenGL or GLUT. Basic Drawing: In the previous lecture, we showed how to create a window in GLUT,

More information

Lecture 4 of 41. Lab 1a: OpenGL Basics

Lecture 4 of 41. Lab 1a: OpenGL Basics Lab 1a: OpenGL Basics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://snipurl.com/1y5gc Course web site: http://www.kddresearch.org/courses/cis636 Instructor

More information

Drawing Primitives. OpenGL basics

Drawing Primitives. OpenGL basics CSC 706 Computer Graphics / Dr. N. Gueorguieva 1 OpenGL Libraries Drawing Primitives OpenGL basics OpenGL core library OpenGL32 on Windows GL on most unix/linux systems (libgl.a) OpenGL Utility Library

More information

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

CS 543 Lecture 1 (Part 3) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics CS 543 Lecture 1 (Part 3) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Recall: OpenGL Skeleton void main(int argc, char** argv){ // First initialize

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics OpenGL Basics Yong Cao Virginia Tech References: 2001 Siggraph, An Interactive Introduction to OpenGL Programming, Dave Shreiner,Ed Angel, Vicki Shreiner Official Presentation

More information

CS 432 Interactive Computer Graphics

CS 432 Interactive Computer Graphics CS 432 Interactive Computer Graphics Lecture 3 Part 3 Input and Interactions Matt Burlick - Drexel University - CS432 1 Reading Angel: Chapter 2 Red Book: Chapter 2 Matt Burlick - Drexel University - CS432

More information

Basic Graphics Programming

Basic Graphics Programming 15-462 Computer Graphics I Lecture 2 Basic Graphics Programming Graphics Pipeline OpenGL API Primitives: Lines, Polygons Attributes: Color Example January 17, 2002 [Angel Ch. 2] Frank Pfenning Carnegie

More information

Input and Interaction. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Input and Interaction. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Input and Interaction CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science E. Angel and D. Shreiner : Interactive Computer Graphics 6E Addison-Wesley 2012 1 Objectives

More information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics. Bing-Yu Chen National Taiwan University Computer Graphics Bing-Yu Chen National Taiwan University Introduction to OpenGL General OpenGL Introduction An Example OpenGL Program Drawing with OpenGL Transformations Animation and Depth Buffering

More information

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

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 2: First Program Comp 410/510 Computer Graphics Spring 2017 Programming with OpenGL Part 2: First Program Objectives Refine the first program Introduce a standard program structure - Initialization Program Structure Most

More information

Image Processing. Geometry Processing. Reading: (Not really covered in our text. See Sects 18.1, 18.2.) Overview: Display

Image Processing. Geometry Processing. Reading: (Not really covered in our text. See Sects 18.1, 18.2.) Overview: Display CMSC 427: Chapter 2 Graphics Libraries and OpenGL Reading: (Not really covered in our text. See Sects 18.1, 18.2.) Overview: Graphics Libraries OpenGL and its Structure Drawing Primitives in OpenGL GLUT

More information

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

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3) Computer Graphics (Fall 2008) COMS 4160, Lecture 9: OpenGL 1 http://www.cs.columbia.edu/~cs4160 To Do Start thinking (now) about HW 3. Milestones are due soon. Course Course 3D Graphics Pipeline 3D Graphics

More information

Graphics Programming

Graphics Programming Graphics Programming 3 rd Week, 2011 OpenGL API (1) API (application programming interface) Interface between an application program and a graphics system Application Program OpenGL API Graphics Library

More information

Rendering. Part 1 An introduction to OpenGL

Rendering. Part 1 An introduction to OpenGL Rendering Part 1 An introduction to OpenGL Olivier Gourmel VORTEX Team IRIT University of Toulouse gourmel@irit.fr Image synthesis The Graphics Processing Unit (GPU): A highly parallel architecture specialized

More information

Lectures OpenGL Introduction

Lectures OpenGL Introduction Lectures OpenGL Introduction By Tom Duff Pixar Animation Studios Emeryville, California and George Ledin Jr Sonoma State University Rohnert Park, California 2004, Tom Duff and George Ledin Jr 1 What is

More information

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

Graphics Programming. 1. The Sierpinski Gasket. Chapter 2. Introduction: Graphics Programming Chapter 2 Introduction: - Our approach is programming oriented. - Therefore, we are going to introduce you to a simple but informative problem: the Sierpinski Gasket - The functionality

More information

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

Graphics Programming. August 31, Programming of the Sierpinski gasket. Programming with OpenGL and C/C++ Computer Graphics Graphics Programming August 31, 2005 Contents Our Goal in This Chapter Programming of the Sierpinski gasket How To? Programming with OpenGL and C/C++ OpenGL API (Application Programmer

More information

Computer Graphics (Basic OpenGL)

Computer Graphics (Basic OpenGL) Computer Graphics (Basic OpenGL) Thilo Kielmann Fall 2008 Vrije Universiteit, Amsterdam kielmann@cs.vu.nl http://www.cs.vu.nl/ graphics/ Computer Graphics (Basic OpenGL, Input and Interaction), ((57))

More information

OpenGL refresher. Advanced Computer Graphics 2012

OpenGL refresher. Advanced Computer Graphics 2012 Advanced Computer Graphics 2012 What you will see today Outline General OpenGL introduction Setting up: GLUT and GLEW Elementary rendering Transformations in OpenGL Texture mapping Programmable shading

More information

Lecture 3. Understanding of OPenGL programming

Lecture 3. Understanding of OPenGL programming Lecture 3 Understanding of OPenGL programming What is OpenGL GL: stands for Graphic Library Software interface for rendering purposes for 2D or 3D geometric data objects. Various Pieces gl: The basic libraries.

More information

Lecture 2 2D transformations Introduction to OpenGL

Lecture 2 2D transformations Introduction to OpenGL Lecture 2 2D transformations Introduction to OpenGL OpenGL where it fits what it contains how you work with it OpenGL parts: GL = Graphics Library (core lib) GLU = GL Utilities (always present) GLX, AGL,

More information

Basic Graphics Programming

Basic Graphics Programming CSCI 480 Computer Graphics Lecture 2 Basic Graphics Programming January 11, 2012 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s12/ Graphics Pipeline OpenGL API

More information

C++ is Fun Part 13 at Turbine/Warner Bros.! Russell Hanson

C++ is Fun Part 13 at Turbine/Warner Bros.! Russell Hanson C++ is Fun Part 13 at Turbine/Warner Bros.! Russell Hanson Syllabus 1) First program and introduction to data types and control structures with applications for games learning how to use the programming

More information

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

11/1/13. Basic Graphics Programming. Teaching Assistant. What is OpenGL. Course Producer. Where is OpenGL used. Graphics library (API) CSCI 420 Computer Graphics Lecture 2 Basic Graphics Programming Teaching Assistant Yijing Li Office hours TBA Jernej Barbic University of Southern California Graphics Pipeline OpenGL API Primitives: Lines,

More information

Introduction to OpenGL

Introduction to OpenGL Introduction to OpenGL Tutorial 1: Create a window and draw a 2D square Introduction: The aim of the first tutorial is to introduce you to the magic world of graphics based on the OpenGL and GLUT APIs.

More information

Computer graphics MN1

Computer graphics MN1 Computer graphics MN1 http://www.opengl.org Todays lecture What is OpenGL? How do I use it? Rendering pipeline Points, vertices, lines,, polygons Matrices and transformations Lighting and shading Code

More information

VR-programming tools (procedural) More VRML later in this course! (declarative)

VR-programming tools (procedural) More VRML later in this course! (declarative) Realtime 3D Computer Graphics & Virtual Reality OpenGL Introduction VR-programming Input and display devices are the main hardware interface to users Immersion embeds users through the generation of live-like

More information

Interaction. CSCI 480 Computer Graphics Lecture 3

Interaction. CSCI 480 Computer Graphics Lecture 3 CSCI 480 Computer Graphics Lecture 3 Interaction January 18, 2012 Jernej Barbic University of Southern California Client/Server Model Callbacks Double Buffering Hidden Surface Removal Simple Transformations

More information

OpenGL/GLUT Intro. Week 1, Fri Jan 12

OpenGL/GLUT Intro. Week 1, Fri Jan 12 University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner OpenGL/GLUT Intro Week 1, Fri Jan 12 http://www.ugrad.cs.ubc.ca/~cs314/vjan2007 News Labs start next week Reminder:

More information

Computer Graphics Introduction to OpenGL

Computer Graphics Introduction to OpenGL Computer Graphics 2015 3. Introduction to OpenGL Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2015-09-28 2. 2D Graphics Algorithms (cont.) Rasterization Computer Graphics @ ZJU Hongxin Zhang,

More information

Computer Graphics Primitive Attributes

Computer Graphics Primitive Attributes Computer Graphics 2015 4. Primitive Attributes Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2015-10-12 Previous lessons - Rasterization - line - circle /ellipse? => homework - OpenGL and

More information

Exercise 1 Introduction to OpenGL

Exercise 1 Introduction to OpenGL Exercise 1 Introduction to OpenGL What we are going to do OpenGL Glut Small Example using OpenGl and Glut Alexandra Junghans 2 What is OpenGL? OpenGL Two Parts most widely used and supported graphics API

More information

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

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic

More information

COMP 371/4 Computer Graphics Week 1

COMP 371/4 Computer Graphics Week 1 COMP 371/4 Computer Graphics Week 1 Course Overview Introduction to Computer Graphics: Definition, History, Graphics Pipeline, and Starting Your First OpenGL Program Ack: Slides from Prof. Fevens, Concordia

More information

Precept 2 Aleksey Boyko February 18, 2011

Precept 2 Aleksey Boyko February 18, 2011 Precept 2 Aleksey Boyko February 18, 2011 Getting started Initialization Drawing Transformations Cameras Animation Input Keyboard Mouse Joystick? Textures Lights Programmable pipeline elements (shaders)

More information

Interaction Computer Graphics I Lecture 3

Interaction Computer Graphics I Lecture 3 15-462 Computer Graphics I Lecture 3 Interaction Client/Server Model Callbacks Double Buffering Hidden Surface Removal Simple Transformations January 21, 2003 [Angel Ch. 3] Frank Pfenning Carnegie Mellon

More information

Computer graphic -- Programming with OpenGL I

Computer graphic -- Programming with OpenGL I Computer graphic -- Programming with OpenGL I A simple example using OpenGL Download the example code "basic shapes", and compile and run it Take a look at it, and hit ESC when you're done. It shows the

More information

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

Announcement. Homework 1 has been posted in dropbox and course website. Due: 1:15 pm, Monday, September 12 Announcement Homework 1 has been posted in dropbox and course website Due: 1:15 pm, Monday, September 12 Today s Agenda Primitives Programming with OpenGL OpenGL Primitives Polylines GL_POINTS GL_LINES

More information

Computer Graphics. Downloaded from: LectureNotes 1 CSC-254

Computer Graphics. Downloaded from:   LectureNotes 1 CSC-254 Computer Graphics Downloaded from: http://www.bsccsit.com LectureNotes 1 CSC-254 Lecture 1: Course Introduction Reading: Chapter 1 in Hearn and Baker. Computer Graphics: Computer graphics is concerned

More information

Interaction. CSCI 420 Computer Graphics Lecture 3

Interaction. CSCI 420 Computer Graphics Lecture 3 CSCI 420 Computer Graphics Lecture 3 Interaction Jernej Barbic University of Southern California Client/Server Model Callbacks Double Buffering Hidden Surface Removal Simple Transformations [Angel Ch.

More information

Assignment 1. Simple Graphics program using OpenGL

Assignment 1. Simple Graphics program using OpenGL Assignment 1 Simple Graphics program using OpenGL In this assignment we will use basic OpenGL functions to draw some basic graphical figures. Example: Consider following program to draw a point on screen.

More information

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

API for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3 OpenGL Introduction Introduction OpenGL OpenGL is an API for computer graphics. Hardware-independent Windowing or getting input is not included in the API Low-level Only knows about triangles (kind of,

More information

Computer Graphics Course 2005

Computer Graphics Course 2005 Computer Graphics Course 2005 Introduction to GLUT, GLU and OpenGL Administrative Stuff Teaching Assistant: Rony Goldenthal Reception Hour: Wed. 18:00 19:00 Room 31 (Ross 1) Questions: E-mail: cg@cs Newsgroups:

More information

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

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science CSC 307 1.0 Graphics Programming Department of Statistics and Computer Science Graphics Programming GLUT 2 Events in OpenGL Event Example Keypress KeyDown KeyUp Mouse leftbuttondown leftbuttonup With mouse

More information

2/3/16. Interaction. Triangles (Clarification) Choice of Programming Language. Buffer Objects. The CPU-GPU bus. CSCI 420 Computer Graphics Lecture 3

2/3/16. Interaction. Triangles (Clarification) Choice of Programming Language. Buffer Objects. The CPU-GPU bus. CSCI 420 Computer Graphics Lecture 3 CSCI 420 Computer Graphics Lecture 3 Interaction Jernej Barbic University of Southern California [Angel Ch. 2] Triangles (Clarification) Can be any shape or size Well-shaped triangles have advantages for

More information

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

Information Coding / Computer Graphics, ISY, LiTH. OpenGL! ! where it fits!! what it contains!! how you work with it 11(40) 11(40) Information Coding / Computer Graphics, ISY, LiTH OpenGL where it fits what it contains how you work with it 11(40) OpenGL The cross-platform graphics library Open = Open specification Runs everywhere

More information

Cameras (and eye) Ideal Pinhole. Real Pinhole. Real + lens. Depth of field

Cameras (and eye) Ideal Pinhole. Real Pinhole. Real + lens. Depth of field Cameras (and eye) Ideal Pinhole Real Pinhole Real + lens Depth of field 1 Z-buffer How do we draw objects? Polygon Based Fast Raytracing Ray/Object intersections Slow Copyright Pixar 2 Raytracing for each

More information

Input and Interaction. 1. Interaction. Chapter 3. Introduction: - We now turn to the development of interactive graphics programs.

Input and Interaction. 1. Interaction. Chapter 3. Introduction: - We now turn to the development of interactive graphics programs. Input and Interaction Chapter 3 Introduction: - We now turn to the development of interactive graphics programs. - Our discussion has three main parts First, we consider the variety of devices available

More information

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

Computer Graphics (CS 4731) OpenGL/GLUT(Part 1) Computer Graphics (CS 4731) Lecture 2: Introduction to OpenGL/GLUT(Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Recall: OpenGL GLBasics OpenGL s function Rendering

More information

2. OpenGL -I. 2.1 What is OpenGL? Things OpenGL can do: -23-

2. OpenGL -I. 2.1 What is OpenGL? Things OpenGL can do: -23- 2.1 What is OpenGL? -23-2. OpenGL -I - Device-independent, application program interface (API) to graphics hardware - 3D-oriented - Event-driven Things OpenGL can do: - wireframe models - depth-cuing effect

More information

CS559: Computer Graphics. Lecture 12: OpenGL Transformation Li Zhang Spring 2008

CS559: Computer Graphics. Lecture 12: OpenGL Transformation Li Zhang Spring 2008 CS559: Computer Graphics Lecture 2: OpenGL Transformation Li Zhang Spring 28 Today Transformation in OpenGL Reading Chapter 3 Last time Primitive Details glpolygonmode(glenum face, GLenum mode); face:

More information

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 4: Three Dimensions

Comp 410/510 Computer Graphics Spring Programming with OpenGL Part 4: Three Dimensions Comp 410/510 Computer Graphics Spring 2018 Programming with OpenGL Part 4: Three Dimensions Objectives Develop a bit more sophisticated three-dimensional example - Rotating cube Introduce hidden-surface

More information

CS Computer Graphics: Intro to OpenGL

CS Computer Graphics: Intro to OpenGL CS 543 - Computer Graphics: Intro to OpenGL by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) OpenGL Basics Last time: What is Computer Graphics? What is a graphics library What to expect

More information

CS Computer Graphics: Intro to OpenGL

CS Computer Graphics: Intro to OpenGL CS 543 - Computer Graphics: Intro to OpenGL by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) OpenGL Basics Last time: What is Computer Graphics? What is a graphics library What to expect

More information

2D Drawing Primitives

2D Drawing Primitives THE SIERPINSKI GASKET We use as a sample problem the drawing of the Sierpinski gasket an interesting shape that has a long history and is of interest in areas such as fractal geometry. The Sierpinski gasket

More information

Computer Graphics CS 543 Lecture 4 (Part 2) Building 3D Models (Part 2)

Computer Graphics CS 543 Lecture 4 (Part 2) Building 3D Models (Part 2) Computer Graphics CS 543 Lecture 4 (Part 2) Building 3D Models (Part 2) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Modeling a Cube In 3D, declare vertices as (x,y,z)

More information

OpenGL for dummies hello.c #include int main(int argc, char** argv) { glutinit(&argc, argv); glutinitdisplaymode (GLUT_SINGLE GLUT_RGB); glutinitwindowsize (250, 250); glutinitwindowposition

More information

UNIT 7 LIGHTING AND SHADING. 1. Explain phong lighting model. Indicate the advantages and disadvantages. (Jun2012) 10M

UNIT 7 LIGHTING AND SHADING. 1. Explain phong lighting model. Indicate the advantages and disadvantages. (Jun2012) 10M UNIT 7 LIGHTING AND SHADING 1. Explain phong lighting model. Indicate the advantages and disadvantages. (Jun2012) 10M Ans: Phong developed a simple model that can be computed rapidly It considers three

More information

Books, OpenGL, GLUT, GLUI, CUDA, OpenCL, OpenCV, PointClouds, and G3D

Books, OpenGL, GLUT, GLUI, CUDA, OpenCL, OpenCV, PointClouds, and G3D Books, OpenGL, GLUT, GLUI, CUDA, OpenCL, OpenCV, PointClouds, and G3D CS334 Spring 2012 Daniel G. Aliaga Department of Computer Science Purdue University Computer Graphics Pipeline Geometric Primitives

More information

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

OpenGL. Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University OpenGL Jimmy Johansson Norrköping Visualization and Interaction Studio Linköping University Background Software interface to graphics hardware 250+ commands Objects (models) are built from geometric primitives

More information

SOURCES AND URLS BIBLIOGRAPHY AND REFERENCES

SOURCES AND URLS BIBLIOGRAPHY AND REFERENCES In this article, we have focussed on introducing the basic features of the OpenGL API. At this point, armed with a handful of OpenGL functions, you should be able to write some serious applications. In

More information

Display Lists in OpenGL

Display Lists in OpenGL Display Lists in OpenGL Display lists are a mechanism for improving performance of interactive OpenGL applications. A display list is a group of OpenGL commands that have been stored for later execution.

More information

Introduction to OpenGL. CSCI 4229/5229 Computer Graphics Fall 2012

Introduction to OpenGL. CSCI 4229/5229 Computer Graphics Fall 2012 Introduction to OpenGL CSCI 4229/5229 Computer Graphics Fall 2012 OpenGL by Example Learn OpenGL by reading nehe.gamedev.net Excellent free tutorial Code available for many platforms and languages OpenGL:

More information

Introduction to OpenGL

Introduction to OpenGL CS100433 Introduction to OpenGL Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Before OpenGL Let s think what is need

More information

1.2 Basic Graphics Programming

1.2 Basic Graphics Programming Fall 2018 CSCI 420: Computer Graphics 1.2 Basic Graphics Programming Hao Li http://cs420.hao-li.com 1 Last time Last Time Story Computer Graphics Image Last Time 3D Printing 3D Capture Animation Modeling

More information

Class of Algorithms. Visible Surface Determination. Back Face Culling Test. Back Face Culling: Object Space v. Back Face Culling: Object Space.

Class of Algorithms. Visible Surface Determination. Back Face Culling Test. Back Face Culling: Object Space v. Back Face Culling: Object Space. Utah School of Computing Spring 13 Class of Algorithms Lecture Set Visible Surface Determination CS56 Computer Graphics From Rich Riesenfeld Spring 13 Object (Model) Space Algorithms Work in the model

More information

Using OpenGL with CUDA

Using OpenGL with CUDA Using OpenGL with CUDA Installing OpenGL and GLUT; compiling with nvcc Basics of OpenGL and GLUT in C Interoperability between OpenGL and CUDA OpenGL = Open Graphic Library creation of 3D graphic primitives

More information

CSC 8470 Computer Graphics. What is Computer Graphics?

CSC 8470 Computer Graphics. What is Computer Graphics? 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

More information

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

CS418 OpenGL & GLUT Programming Tutorial (I) Presented by : Wei-Wen Feng 1/30/2008 CS418 OpenGL & GLUT Programming Tutorial (I) Presented by : Wei-Wen Feng 1/30/2008 2008/2/3 Slide 2 I Am Your TA Name : Wei-Wen Wen Feng 4th Year Graduate Student in Graphics I will be Holding discussion/tutorial

More information

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

Geometry Primitives. Computer Science Department University of Malta. Sandro Spina Computer Graphics and Simulation Group. CGSG Geometry Primitives Geometry Primitives Sandro Spina Computer Graphics and Simulation Group Computer Science Department University of Malta 1 The Building Blocks of Geometry The objects in our virtual worlds are composed

More information