School of Computer Science

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

School of Computer Science University of Seoul. How can we create a window? How can we handle the events? What kind of objects can we render? How can.
Computer Graphics 2D & 3D Transformation.
02/17/05CISC640/440 OpenGL Tutorial1 OpenGL Tutorial CISC 640/440 Computer Graphics TA: Qi Li/Mani Thomas
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
3D Game Programming Geometric Transformations
Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Basics. OpenGL. “Hello world” George Georgiev Telerik Corporation
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Today: - Make sure everyone is set up with an OpenGL environment - OpenGL basics:
Lab 1: OpenGL Tutorial CS 282. What’s the plan for today? Go over our framework code. Learn some basic OpenGL! Reveal Lab 1 Answer questions.
1 3D modelling with OpenGL Brian Farrimond Robina Hetherington.
Computer Graphics (Fall 2003) COMS 4160, Lecture 6: OpenGL 2 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
OpenGL (II). How to Draw a 3-D object on Screen?
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
Introduction to OpenGL M. Ramanathan STTP CAD 2011Introduction to OpenGL.
Introduction to OpenGL Jian Huang This set of slides are extracted from the Interactive OpenGL Programming course given by Dave Shreine, Ed Angel and Vicki.
19/4/ :32 Graphics II Syllabus Selection and Picking Session 1.
1 OpenGL Basics A Graphics Standard ©Mel Slater, Anthony Steed
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
TWO DIMENSIONAL GEOMETRIC TRANSFORMATIONS CA 302 Computer Graphics and Visual Programming Aydın Öztürk
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
Geometric transformations The Pipeline
Graphics Programming using OpenGL. OpenGL is a software interface that allows the programmer to create 2D and 3D graphics images. This interface consists.
Korea University Korea University Computer Graphics Laboratory Computer Graphics Laboratory Jung Lee, Chapter 13.
OpenGL and Parametric Curves Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2005/12/21 with slides by Brian Curless, Zoran Popovic, Robin.
CSE 470: Computer Graphics. 10/15/ Defining a Vertex A 2D vertex: glVertex2f(GLfloat x, GLfloat y); 2D vertexfloating pointopenGL parameter type.
Homogeneous Form, Introduction to 3-D Graphics Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 20,
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Ch 2 Graphics Programming page 1 CSC 367 Coordinate Systems (2.1.2) Device coordinates, or screen coordinates (pixels) put limitations on programmers and.
Lecture 11: Exam Revision 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271  Coursework.
Computing & Information Sciences Kansas State University Lecture 19 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 19 of 42 William H. Hsu.
Computer Graphics Bing-Yu Chen National Taiwan University.
OpenGL: Introduction Yanci Zhang Game Programming Practice.
Computer Science Term 1, 2006 Tutorial 2 Assignment 3 – The Virtual World.
Review of OpenGL Basics
Intro to OpenGL Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?
Advanced Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, October 31, 2003.
Viewing and Transformation. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
OpenGL: The Open Graphics Language Introduction By Ricardo Veguilla.
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
Lecture 7 Midterm Review. OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture.
Mobile & Casual Gaming OpenGL ES Intro. /red/chapter03.html.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSC Graphics Programming Budditha Hettige Department of Statistics and Computer Science.
OpenGL: The Open Graphics Language Technology and Historical Overview By Ricardo Veguilla.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Lecture 8: Discussion of papers OpenGL programming Lecturer: Simon Winberg Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
School of Computer Science
Introduction of OpenGL - 3D Graphic and Animation
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSC461: Lecture 20 Parallel Projections in OpenGL
School of Computer Science
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
OpenGL (Open Graphics Library) Mr. B.A.Swamy Assistant Professor Dept of CSE.
Rendering Pipeline, OpenGL/GLUT
Introduction to OpenGL
Modeler Help Session CSE 457, Spring 2005
Computer Graphics 3Practical Lesson
Preview of 3-D Graphics Glenn G. Chappell
Presentation transcript:

School of Computer Science Computer Graphics School of Computer Science University of Seoul Minho Kim

To Get Started... What we need? To create a window To handle events To render objects OpenGL only supports “rendering” process Helper library required → GLUT (GL Utility Toolkit)

sample01.c Minimal OpenGL program How can we compile it? What each function call does? What happens if we remove each function call? What is the relationship between the coordinates of the vertices and the screen? How can we change the initial window size/position? How can we change the color used to clear the screen? How can we change the color of the rectangle? How can we draw other primitives?

More on OpenGL/GLUT Naming conventions Data types What are the buffers other than color buffer? How many states are there? Which objects can we draw? What other events can we handle?

sample02.c What do we need to do for “double buffering”? How can we handle the keyboard event? How can we handle other key events, such as function keys and arrow keys? How can we handle modifier keys? How can we change the mapping between the coordinate system and the screen? How can we remove the distortion?

sample03.c To change the (orthographic 2D) camera setting dynamically – translation & zooming How can we rotate the camera? What types of cameras are supported? What is the default camera setting? What does the projection matrix do? How can we make the image flipped vertically/horizontally? How can we achieve the same effect using glMultMatrix?

Matrix Stacks The top element denotes current matrix state Four stacks: modelview, projection, texture, and color Different (minimum) stack depth for each Stored in column-major format Operations glLoadIdentity, glLoadMatrix, glPushMatrix, glPopMatrix, glMultMatrix, etc. Can handle hierarchical transformation (modelview) – How?

sample04.c Transformation using modelview matrix stack What's the content of the modelview matrix stack? How can we implement scissor-type “hand”?

sample05.c Perspective projection glFrustum How can we zoom in/out? How can we achieve the same projection using glMultMatrix?

Hidden-Surface Removal OpenGL uses z-buffering (depth-buffering) To-do: Request depth buffer (glutInitDisplayMode) Enable depth test (glEnable(GL_DEPTH_TEST)) Clear depth buffer before rendering (glClear)