1 A first OpenGL program Brian Farrimond Robina Hetherington.

Slides:



Advertisements
Similar presentations
Drawing a TV in One-Point Perspective
Advertisements

02/17/05CISC640/440 OpenGL Tutorial1 OpenGL Tutorial CISC 640/440 Computer Graphics TA: Qi Li/Mani Thomas
Lesson One: The Beginning
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
OpenGL Computação Gráfica. O que é OpenGL? A low-level graphics programming language Intended for interactive graphics: 2D & 3D A software interface to.
© 2004, Tom Duff and George Ledin Jr1 Lectures OpenGL Introduction By Tom Duff Pixar Animation Studios Emeryville, California and George Ledin Jr Sonoma.
1 3D modelling with OpenGL Brian Farrimond Robina Hetherington.
CSC 461: Lecture 51 CSC461 Lecture 5: Simple OpenGL Program Objectives: Discuss a simple program Discuss a simple program Introduce the OpenGL program.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Computer Science,
OpenGL (II). How to Draw a 3-D object on Screen?
Editing Process Of Front Cover Lauren Alger I have shown screen shots of how I have put together all four of my pages for my final music magazine product.
Areas How do you work out the area of this shape ? HINT.
1 Exercise Two The Digital Camera Helpful Notes 2004.
Using Graphics Libraries Lecture 3 Mon, Sep 1, 2003.
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
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.
Lecture 15: Intro to Graphics Yoni Fridman 7/25/01 7/25/01.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 2.
Tkinter Canvas.
Control flow for interactive applications CSE 3541 Matt Boggus.
Lecture 2: Some definitions of terms 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
NoufNaief.net 1 TA: Nouf Al-Harbi.
Improving the appearance of 3D OpenGL scenes
V 1.0 Programming III. Graphical possibilities Simple graphics (shapes)
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
1 Programming with OpenGL Part 2: Complete Programs.
OpenGL API 2D Graphic Primitives Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
PyGame - Unit 1 PyGame Unit – – Introduction to PyGame.
Introduction to Graphics Programming. Graphics API.
Computer Graphics I, Fall Programming with OpenGL Part 2: Complete Programs.
You can create cloze worksheets, print them out and give the to the students to fill in. You can display the worksheet on the data-projector and correct.
Dexterity Skills Exercise. What is dexterity? The skill in performing tasks, especially with the hands. The coordination of small muscle movements—usually.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Introduction of OpenGL - 3D Graphic and Animation
CSS Layouts CH 13.
Pixels, Colors and Shapes
Programming with OpenGL Part 2: Complete Programs
Lesson One: The Beginning Chapter 1: Pixels Learning Processing Daniel Shiffman Presentation by Donald W. Smith Graphics from
OpenGL API 2D Graphic Primitives
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
Programming with OpenGL Part 2: Complete Programs
OpenGL (Open Graphics Library) Mr. B.A.Swamy Assistant Professor Dept of CSE.
Basic Graphics Drawing Shapes 1.
Smart Graphic Layout TOPIC statement
Animated picture changes during motion path (Advanced)
Lab 3 Geometric Drawing Lab 3 Geometric Drawing.
Class 1: First Program.
Building Java Programs
TAB ONE TAB TWO TAB THREE TAB FOUR TAB FIVE
Let’s start at where we left out just now
Introduction to OpenGL
موضوع بحث: تعریف علم اصول جلسه 43.
اشاره به نتایج قیاس های فقهی گاهی، حکم شرعی است
علم اصول، «نفس قواعد» است نه «علم به قواعد»
Pictures in 3-D flip book (Intermediate)
Images Presentation Name Course Name Unit # – Lesson #.# – Lesson Name
OpenGL program.
12.4 p 471 a) double[] number = {1.05, 2.05, 3.05, 4.05, 5.05};
Programming with OpenGL Part 2: Complete Programs
Smart Graphic Layout TOPIC statement
CS297 Graphics with Java and OpenGL
Surface Area of Rectangle Prisms
Programming with OpenGL Part 2: Complete Programs
mouseControl(int button, int state, int x, int y)
قاعده لا ضرر، تنها در شبهات حکمیه جاری است
جلسه 34.
1 ج : اشاره بعضی از اصولیون به تعریف ترکیبی آخوند با «یک لفظ»
Presentation transcript:

1 A first OpenGL program Brian Farrimond Robina Hetherington

2 Ex01 Build and run Ex01

3 Program structure Three function program

4 main

5 Always present Uses RGB colours (Red, Green, Blue)

6 main Sets up the scene window

7 Window exercises Double the size of the window height and width Make the window start at the top left corner of the screen Change the window title to “2D OpenGL”

8 main Set up the graphical characteristics of the new window

9 init Set the background colour: red green blue alpha (transparency) Min value: 0.0 Max value: 1.0 Exercise: Set the background colour to red

10 init Set projection to be orthographic

11 Projections Orthographic projection shows no perspective

12 Orthographic projection glOrtho(left, right, bottom, top, near, far)

13 main

14 main Name of the function that will draw the scene

15 display

16 display Clear the window using the background colour

17 display glColor3f(red, green, blue) Min value: 0.0 Max value: 1.0 Exercise: Make the rectangle yellow

18 display Draw the rectangle (polygon with four vertices)

19 glVertex(x, y, z)

20 glVertex(x, y, z)

21 glVertex(x, y, z)

22 glVertex(x, y, z)

23 glVertex(x, y, z)

24 glVertex(x, y, z) Vertices are in anticlockwise order

25 g lOrtho(left, right, bottom, top, near, far); glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);

26 g lOrtho(left, right, bottom, top, near, far); glOrtho(-0.5, 1.0, 0.0, 1.5, -1.0, 1.0);

27 The new projection

28 main How we manage animation and interaction

29 OpenGL drawing primitives

30 OpenGL drawing primitives

31 OpenGL drawing primitives

32 OpenGL drawing primitives

33 OpenGL drawing primitives

34 OpenGL drawing primitives